Reputation: 1353
I have google app with credentials: app-name, api-key, client-id, client-email, client-secret ...
Is it possible to get access to youtube api without user autorization. For example with user auth I can get refresh tokern and get access token like this:
TokenResponse response = new RefreshTokenRequest( GOOGLE_HTTP_TRANSPORT, GOOGLE_JSON_FACTORY, new GenericUrl( "https://www.googleapis.com/oauth2/v3/token" ), channelYoutubeAccess.getRefreshToken() ).setClientAuthentication( new ClientParametersAuthentication( getGoogleClientId(), getGoogleClientSecret() ) ).execute();
if( response != null ) {
accessToken = response.getAccessToken();
}
Could you help me. Thank you.
Upvotes: 0
Views: 635
Reputation: 1353
final YouTube.Videos.List listRq = youtube.videos().list("id, status").setId(id).setKey(CLIENT_KEY);
VideoListResponse searchResponse = listRq.execute();
Upvotes: 0