Integrating Google Drive in Play Scala application with Google+ API

In our earlier blog, i.e., Integrating Google Drive infrastructure in Play Scala application we talked about integrating the Google Drive infrastructure in Play Scala application as like Assembla and some others. In that blog we used OAuth2 in order to communicate with the Google using Access Token and Refresh Token.

For getting the Access Token & Refresh Token we used following Scopes of Google API:

But now Google API has deprecated these scopes, and Google will shut down the support for these scopes on September 1, 2014. For further information on Google API’s new Scopes click here.

So for integrating Google Drive API with new scopes of Google+, just make following changes.

1. Go to the Google Developers Console, & find the Google+ API in the APIs & auth section (given in the sidebar on the left) and set its status to ON.

2. Then prepare the browser request URL with Google+ scopes, in order to get the authorization code.

The only change we have made in above code is the:

Scope – https://www.googleapis.com/auth/plus.login

Rest everything remains same.

3. When the users will hit this url , they’ll be asked to Log in and allowing the application to access of their Google Drive’s documents and the other basic information. New scope will ask for User’s profile, & the list of circled people that the user has granted your app access to know.

4. Now follow from step-3 given in here.

So, we see that it is quite easy to upgrade to new Google+ scopes.

Written by 

Himanshu Gupta is a lead consultant having more than 4 years of experience. He is always keen to learn new technologies. He not only likes programming languages but Data Analytics too. He has sound knowledge of "Machine Learning" and "Pattern Recognition".He believes that best result comes when everyone works as a team. He likes listening to Coding ,music, watch movies, and read science fiction books in his free time.

1 thought on “Integrating Google Drive in Play Scala application with Google+ API

  1. Thanks for your comprehensive posts on integrating Google Drive with a Scala application! Do you have any advice for debugging CORS errors? I’ve enabled the CORS filter for Play 2.6.x but am having trouble redirecting to the redirect URI you provide here as I’m getting a “no ‘access-control-allow-origin’ header is present on the requested resource” error in the browser console.

Leave a Reply

%d bloggers like this: