Question
1. What determines the expiration date of a refresh token?
2. When does HULFT Square get an access token from Salesforce?
3. Is it necessary to get an access token again within the expiration period of a refresh token?
4. When a refresh token expires, how does HULFT Square get an access token and a refresh token again?
Answer
1. What determines the expiration date of a refresh token?
The [Refresh Token Policy] in the [Connected App] on the Salesforce side determines the expiration date of a refresh token.
2. When does HULFT Square get an access token from Salesforce?
HULFT Square gets an access token and a refresh token from Salesforce when you press [OK] on the [Exchange authorization code for tokens] screen.
At this timing, HULFT Square exchanges an authorization code gotten from Salesforce for the both tokens.
3. Is it necessary to get an access token again within the expiration period of a refresh token?
If an access token expires within the expiration period of the refresh token, it is necessary to use the refresh token to obtain a new access token. The access token obtained using the refresh token also has its own expiration time, typically shorter than that of the refresh token. Therefore, periodic refreshes may be required within the validity period of the refresh token to maintain continuous access to the Salesforce resources.
4. When a refresh token expires, how does HULFT Square get an access token and a refresh token again?
If an refresh token has expired, you need to pass the authentication flow from the [Authorize] and get an refresh token again.
However, the default [Refresh Token Policy] in Salesforce is indefinite, so a refresh token will not expire unless you manually change the setting.
Please refer to the following official Salesforce documents for details on each question.
Manage OAuth Access Policies for a Connected App
OAuth Tokens and Scopes
You can select displayed language at the bottom of the site. (As of July 4, 2023)
Related FAQs
Salesforce Connector - How to set up connection resource and use connector
Comments
0 comments
Article is closed for comments.