How to access the list of youtube videos using android using googleapiclient?

I have an Android app in which I go into g + and get some information for which I use the GoogleApiClient object. It is assumed that he will be able to access the entire google-aviz depending on how you configured it. I do this for g +:

mGoogleApiClient = new GoogleApiClient.Builder(this).addConnectionCallbacks(this).addOnConnectionFailedListener(this).addApi(Plus.API, Plus.PlusOptions.builder().build()).addScope(Plus.SCOPE_PLUS_LOGIN).build(); 

I try to give him permission to access youtube too, but I could not find which apis are available in the addApi method and how to use them. The youtube api docs application uses a completely different method, which is incompatible with what I already have. How can I access youtube with my current code?

+5
source share
1 answer

add youtube permission then you can use api data. I am looking for using youtube api with auth.

 GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN) // scope=https://www.googleapis.com/auth/youtube& .requestScopes(new Scope(YouTubeScopes.YOUTUBE_READONLY)) .requestId() .requestEmail() .build(); 
0
source

All Articles