I'm trying to get a token valid for a long time and I am not sure how to proceed. I'm sending data to a Google Sheet on a daily basis so a 24h token doesn't allow me to have this automated.
Thanks
The generic way of obtaining tokens expiring longer than 24 hours is to get a refresh token. You can start by reading the instructions here:
Using OAuth 2.0 to Access Google APIs
Get Refresh Tokens
Refreshing Access Tokens
2.1m questions
2.1m answers
60 comments
57.0k users