Question

How long is the access code valid for when a google drive api based app has been approved?

Can I save this code in my app and re-use it to avoid needing a human to authorize it repeatedly?

Was it helpful?

Solution

An access token expires in one hour, while a refresh token (that can be used to request new access tokens) lasts until the user revokes access to the app.

You are recommended to store the refresh token for the user's future requests, but should take into account that the token can be invalid any time and react accordingly.

For more details on how to handle authorization in Google Drive apps, check https://developers.google.com/drive/credentials

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top