I am creating a custom integration using the Google Calendar API. I can get the oauth2 authentication to work initially, but it stops working after about an hour. I am trying to get a refresh token, but my guess is that something in that process is not working.
I have setup these URL parameters:
response_type = code
approval_prompt = force (I’ve tried ‘consent’ but same results)
access_type = offline
How can I get my authorization to stick?
Best answer by reevescView original
client_id: Your OAuth2 CLIENT_ID
This should allow you refresh the token without having to interact with the user.
Thank you for the reply. I was able to get this fixed.
In the end, I set up my Authorization URL parameters as you mentioned.
For my access token request I have:
And for Refresh Token Request
client_id (same as above)
client_secret (same as above)
It’s now working flawlessly!
This documentation helped: