oauth 2.0 - Android: Google OAuth2 Scopes Format -


tutorials , documentation google oauth2 login android inconsistent format , style of scopes used googleauthutil.gettoken. include scopes urls or words, include client id or not, , use android app, service account, or web app id? i'm trying now:

string mscope="oauth2:server:client_id:xxxxxxxxxx:api_scope:https://www.googleapis.com/auth/plus.login" 

but throws googleauthexception: unknown error. if don't include client id access token, trying authenticate our backend django web app, 403: forbidden error.

there's example @ https://github.com/googledrive/crossclientoauth2-android:

final private string client_id = "abc123.apps.googleusercontent.com"; final private list<string> scopes = arrays.aslist(new string[]{     "https://www.googleapis.com/auth/plus.login",     "https://www.googleapis.com/auth/drive" });  string scope = string.format("oauth2:server:client_id:%s:api_scope:%s", client_id, textutils.join(" ", scopes)); 

Comments

Popular posts from this blog

Android : Making Listview full screen -

javascript - Parse JSON from the body of the POST -

javascript - Chrome Extension: Interacting with iframe embedded within popup -