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.

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.

  • 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 '14 at 11:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.