Monday, April 30, 2012

[YouTube-API] OAuth2.0 Error : 405 method not allowed

Hello ,

I had issues getting the access token for youtube API using oAuth2.0.  I got the the "code" parameter from the step 1:

https://accounts.google.com/o/oauth2/auth?client_id=clientID&redirect_uri=redirectlink&scope=https://gdata.youtube.com&response_type=code&access_type=offline

The resposnse for the above request was like :
https://localhost:51799/oauth2callback?code=4/Oj16pMMdXfO410Ji5qP0nTctVfx2

And I tried to exchange the "code" parameter for access token but it's throwing an error 405, Method not allowed.  

Here is my http request :

https://accounts.google.com/o/oauth2/token?code=4/Oj16pMMdXfO410Ji5qP0nTctVfx2&client_id= clientID &client_secret=clientsecret
&redirect_uri= redirectlink &grant_type=authorization_code

Even the simple http request for access token without any parameters "https://accounts.google.com/o/oauth2" throwing the same error.  Please let me know If there is anything wrong with the above request.  Any help would be appreciated.

Thanks,
Sagar


--
You received this message because you are subscribed to the Google Groups "YouTube APIs Developer Forum" group.
To view this discussion on the web visit https://groups.google.com/d/msg/youtube-api-gdata/-/B8-8J_Zm1mgJ.
To post to this group, send email to youtube-api-gdata@googlegroups.com.
To unsubscribe from this group, send email to youtube-api-gdata+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/youtube-api-gdata?hl=en.

1 comment:

  1. Can you help me with Office Access Token Generation for Youtube. I am on the same page as you mentioned above. I am getting code but not token.

    ReplyDelete