I am trying to generate an access_token and refresh_token to access the google spreadsheets APIs. I have used the API https://www.googleapis.com/oauth2/v3/token?code=&grant_type=authorization_code&redirect_uri=&client_id=&client_secret=&approval_prompt=force This API gives only "access_token", "type", and "expires_in" in the response and does not give a "refresh_token" How can we refresh the access token? I have tried using the API https://accounts.google.com/o/oauth2/token that needs "refresh_token" as a query parameter. I didn't find any refresh_token initially and hence was not able to hit this API. Could somebody describe the steps for obtaining a refresh_token for Spreadsheets APIs?
Asked
Active
Viewed 284 times
0
-
Will be this information useful for you? https://stackoverflow.com/questions/42815450/refresh-google-drive-access-token/42822060#42822060 – Tanaike Jun 13 '17 at 21:48
1 Answers
0
Looks like you want to use access_type=offline
Source: https://developers.google.com/identity/protocols/OAuth2WebServer#offline

John
- 329
- 2
- 10