function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Test Dev 81Test Dev 81 

Validity of salesforce refresh token

Hi there,
I want to access my REST class using restresh_token
I have accessed refresh token using this URL 
https://<YOUR_INSTANCE>.salesforce.com/services/oauth2/authorize?response_type=code&client_id=<CONSUMER_KEY>&redirect_uri=https://login.salesforce.com/

curl -X POST https://<YOUR_INSTANCE>.salesforce.com/services/oauth2/token?code=<CODE>&grant_type=authorization_code&client_id=<CONSUMER_KEY>&client_secret=<CONSUMER_SECRET>&redirect_uri=https://login.salesforce.com/

Can I use this refresh token every time to generate my access_token
How long this refresh token will work?
PriyaPriya (Salesforce Developers) 

Hi ,
 

Please refer this article for information :- 

https://help.salesforce.com/articleView?id=sf.remoteaccess_oauth_refresh_token_flow.htm&type=5#send_at_response

https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/intro_oauth_and_connected_apps.htm

If the above information helps you, please mark it as best answer.:-