I'm using this:


Which gets redirected to (upon success):


As you can see, the redirected URL doesn't contain the refresh_token specified here: https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/intro_understanding_web_server_oauth_flow.htm

What am I missing?

  • 1
    Have you configured this in Salesforce using Connected apps? – the_phantom Jun 2 '15 at 19:49
  • In the connected app it shows Refresh Token Policy: Immediately expire refresh token. The problem is, it's not showing any other option. – yi1 Jun 3 '15 at 12:58
  • Found this salesforce.stackexchange.com/questions/69161/… - which solved my problem. Thanks @heisenberg (I wish they documented this!) – yi1 Jun 3 '15 at 13:01
  • Great.. enjoy... – the_phantom Jun 3 '15 at 13:03

I think you need to specify the scope, like this:

https://na16.salesforce.com/services/oauth2/authorize?response_type=token&client_id=[your_client_id]&redirect_uri=https://login.salesforce.com/services/oauth2/success&display=touch&scope=full refresh_token

Specifically, this:

scope=full refresh_token

(This is what I use, and it works)

|improve this answer|||||
  • How is scope=full refresh_token a valid URL? It has a space in it? – Micah Jul 6 '18 at 20:09
  • This is a while a ago... add an underscore, it could be a typo... either that or a + – Caspar Harmer Jul 6 '18 at 22:24
  • Yep, looks like a typo. %20 or + works fine. – Micah Jul 11 '18 at 22:14
  • 1
    this "full" is misleading – Theo Feb 11 '19 at 13:34
  • Yup, it sure is... I forget if you can write it like scope=full+refresh_token ... possibly? – Caspar Harmer Feb 11 '19 at 18:44

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.