2. Exchange authorization code for refresh and access tokens
To exchange an authorization code for an access token, call the https://oauth2.googleapis.com/token endpoint and set the following parameters:
Fields
Value
Required
client_id
329011709740-sq6l548671df39l5bingat6kpd0rmuth.apps.googleusercontent.com
Yes
client_secret
xxx
Yes
code
4/0AWgavdeTEPxfXAPtbSUqv2OrbfRPywz7JUhCeZbDV4smVxBOgztU4TzFqNOwC0diUCCPog
Yes
grant_type
authorization_code
Yes
redirect_uri
http://localhost:5001/callback
Yes
POST
https://oauth2.googleapis.com/token/
Query Parameters
Name
Type
Description
client_id*
String
329011709740-sq6l548671df39l5bingat6kpd0rmuth.apps.googleusercontent.com
client_secret*
String
xxx
code*
String
4/0AWgavdeTEPxfXAPtbSUqv2OrbfRPywz7JUhCeZbDV4smVxBOgztU4TzFqNOwC0diUCCPog
grant_type*
String
authorization_code
redirect_uri*
String
http://localhost:5001/callback
Last updated