Hello there,
I created a Connected Systems using the OAuth 2.0: Authorization Code Grant option, to connect with Google.The Connected Systems itself works and the integrations that use it, also work.
The problem is, after authorizing with the user, we get the following note:
No refresh token was captured, which means users may need to manually reauthorize more frequently. Check the external system’s documentation to determine if refresh tokens are supported and how to request them.
I'm using these integrations in an automated process, which makes it very hard to maintain if the user needs to authorize every hour.
I attached the configurations of the Connected System and the note.Is there anything that I'm doing wrong or a possible workaround?
Thank you in advance, Miguel.
Discussion posts and replies are publicly visible
Since access token have limited lifetimes, a refresh token allows OAuth client to get a new access token without any interaction. In order to receive a refresh token on authorization from a Google API, you need to add an extra query parameter to your auth URL. Modify your auth URL to https://accounts.google.com/o/oauth2/v2/auth?access_type=offline, which includes a query parameter of access_type set to offline.
Hello Sanchit, thank you for your answer.
That is indeed a good guess, didn't think about it.But it seems like the access_type parameter is already being sent in the URL.