2

I am using username/password flow . I am getting access token . But when will that access token expires, so that I can request for new access token. i don't want to get access token with each request to SF. I am using it in java web application.

1 Answer 1

2

Simply make your API calls normally. If the session has expired, you'll get an INVALID_SESSION error (4xx error code), at which point you can simply login again. Note that sessions are valid while in use, which means as long as one API call occurs before the session expires, the timer for that session will reset.

1
  • Thanks.. It worked for me.. If I got 401 error code , then I am authenticating again to get new access token....
    – Pramod R
    Oct 30, 2014 at 11:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .