I am trying to use Google Calendar API from Android client. I have opted OAuth 2.0 for Installed Apps instead of Account Manager for some reasons.
https://developers.google.com/accounts/docs/OAuth2InstalledApp
I have registered my application on Developer API Console and hence I have client_id and redirect uri. The console does not show client_secret.
I have recieved Authorization code from the google server which is 4/XdlW5dvFW3OWCnKdeG8yDOOjYGAw
https://accounts.google.com/o/oauth2/token?
code=4/XdlW5dvFW3OWCnKdeG8yDOOjYGAw&
client_id=54957922365-fjaa2quhukho8sr5bkpkoq8038vdjh9m.apps.googleusercontent.com&
redirect_uri=urn:ietf:wg:oauth:2.0:oob&
grant_type=authorization_code
If I make this HTTPS URL with the mentioned parameters, I recieve 405 Error Method not allowed in my code. As specified in the URL above, I have added the parameters but am not able to exchange the auth code with access token. Does anyone has any idea why I am not getting access token while I am able to retrieve authorization code?