Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Salesforce by (11.9k points)

I am working with Oauth2.0. In that i could able get the access_token and instance_url. Is there any expiry time for these two.

Can I store them and use it for all my REST calls without getting the new access_token and the instance_url. Is it possible for me to use it for long hours or even days.

1 Answer

0 votes
by (32.1k points)

So, basically, the access token is valid for a particular length of a session, as it's actually a session ID, that said, you should also be given a refresh token. The refresh token has a much longer lifetime and can be used to authenticate the user once the session has expired, without them having to enter any credentials — this allows you to do it in the background without them even having to concern themselves with the login process.

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...