2

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?

1

1 Answer 1

1

Thanks for the code snippet but I was not posting the link on browser, I have written proper android HTTPS code in Android Project. Just for the reference I shared the url. I have solved this issue. To help other developers, I am attaching the code: https://github.com/misskhushboo/Code-Snippets.git

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.