Java: how to get youtube access/refresh token for app? -
i have google app credentials: app-name, api-key, client-id, client-email, client-secret ...
is possible access youtube api without user autorization. example user auth can refresh tokern , access token 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 me. thank you.
final youtube.videos.list listrq = youtube.videos().list("id, status").setid(id).setkey(client_key); videolistresponse searchresponse = listrq.execute();
Comments
Post a Comment