How to connect to S...
 
Notifications
Clear all

[Solved] How to connect to Salesforce from external app without session resetting access token every time

2 Posts
1 Users
0 Likes
341 Views
Posts: 205
 CWL
Admin
Issue starter
(@cwl)
Member
Joined: 11 years ago

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
Posts: 205
 CWL
Admin
Issue starter
(@cwl)
Member
Joined: 11 years ago

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)

Reply
Share: