How do you exchange Authorization code for a OAuth2 token for google apis in android? If you go to https://code.google.com/oauthplayground/ you can exchange them, but I need to be able to do it in a android app! Any ideas?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I found out myself! 🙂
All you need to do is make a HttpPost to accounts.google.com/o/oauth2/token with the Authorization Code, client id, client secret, redirect_uri and grant type! I added the code to the answer so you can see how to do it exactly! Hope it helps