I have an application which requests youtube data api's. I need to have access token for some request like to get video's, playlist etc. For this I can simply use GoogleAuthUtil
class to get Token by calling:
String access_token = GoogleAuthUtil.getToken(Context, userEmail, "oauth2:https://www.googleapis.com/auth/youtube");
Where third parameter is a Scope
to get access token for particular request. Now I want to make a request which accepts 4 scope to give token back. And this method takes only one scope as an argument.
Is there a way to get access token with more than one scope in Android.
According to the Google docs,
"String representing the authentication scope. To specify multiple scopes, separate them with a space (for example, "oauth2:scope1 scope2 scope3")."
Also that such method is deprecated and you should use the "getTokenWithNotification" version.