i am trying to authorize a youtube data request (scope) using google sing in api. Google Sign In works perferct inside my app and i am getting logged in. How do I use the result of the google sign in api to send a request to a youtube data api scope?
My Sign In:
GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)
.requestScopes(new Scope("https://www.googleapis.com/auth/youtube"))
.build();
api = new GoogleApiClient.Builder(main.getApplicationContext())
.addApi(Auth.GOOGLE_SIGN_IN_API, gso)
.build();
This workes fine.
I get a GoogleSignInAccount and a GoogleApiClient from the result. How do I send a request to youtube for example to add a subscription or get the channel name/id?
Thanks
Keba