Notifications
Clear all
Jun 30, 2022 11:57 am
When connecting to Salesforce from an external app using rest api, you use access token but it gets reset after a while. How to stop this so you can connect every time?
1 Reply
Jun 30, 2022 12:05 pm
You shouldn't use access token all the time. Use it first time to establish the connection and then use refresh-token from then on. Refresh token will be valid until its revoked manually from the connected app in the Salesforce org.
Also when you create the connected app in Salesforce, make sure the Oauth selected scope include: Perform requests on your behalf at any time (refresh_token, offline_access)