1

I am trying to upload videos to youtube using my Android application. But first of all, I must implement the OAuth authentication protocol. Luckily, I am able to access the redirect_uri and the auto generated code. Now, I want the exchange the authorization code for access tokens but for that I need to have the client_secret for making the POST request to the google server. Unlucky for me, there is no client_secret key in my google console account.

I have tried to download the JSON object from console but there isn't any client_secret key.

Hiren
  • 27
  • 1
  • 1
  • 6

1 Answers1

0

Android OAuth2 client doesn't have a client_secret since there is no way you can store a secret on client side securely. Instead, you should use GoogleAuthUtil from google-play-services to get an access token for your Android app and use the toke to upload videos. This blog post explains more on how to get an access token on Android.

mengcheng
  • 331
  • 1
  • 3
  • Thanks..I got the token by selecting the account. Now I want to access the YoutubeAPI and upload the video. Is there any library to call the Youtube API? It will save my time a lot.. – Hiren May 28 '14 at 09:41