2

I have a trouble between integration with SalesForce and our's service.

We are using oauth2 authorization and SalesForce REST API.

Our clients authorize successfully for the first time and get the access and refresh tokens. But the access token is expired. So the error is always 'Session expired or invalid'.

When we try to refresh it via refresh token request it returns the same access token. And so the error is the same.

Refresh token has unlimited lifetime in the salesforce app settings.

Are we doing something wrong? or our clients has some bad settings?

Thank you

  • Can you post the code you're using to do the refresh, and the API call? Sounds like maybe an encoding issue. – metadaddy Oct 28 '15 at 3:00
  • 1
    The problem was in our app with wrong instance url. – Sergey Bondarenko Nov 2 '15 at 10:11
  • Glad you got it working! Could you post that as the answer, so it's more obvious for future devs that might have done the same? Thanks! – metadaddy Nov 2 '15 at 21:28
0

It probably has to do with settings. The session timeout for an access token can be configured in Salesforce from Setup by entering Session Settings in the Quick Find box, then selecting Session Settings.

0

Make sure you are using the session token with the correct instance URL.

You'll get a Session expired or invalid error if you try to use a production org's session against one of your sandbox instances, for example.

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.