I cant seem to get a refresh token as it is always expired. I found the refresh token policy setting but the only option is "Immediately expire refresh token". How do I change this?token settings



I ran across this problem myself and have only just found the solution; I couldn't find it documented anywhere.

The short answer is, your app needs permissions (scope) to have the ability to use refresh tokens.

In Setup > Create > Apps, click the "Edit" link for your Connected App and add the scope "Perform requests on your behalf at any time (refresh_token, offline_access)".

Once this has saved (you may have to wait a while), you will be able to change the value for the refresh token policy

  • I had the exact same issue and Danny's solution is the one I'd recommend – Jason W Mar 17 '15 at 12:35
  • bit help, thanks to user3618377 and @Danny Smart – Huw Jun 23 '16 at 16:49

I did what Danny listed, but was still getting an unauthorized issue when I would come in the next day. There is an additional step in the documentation to actually prevent the refresh token from expiring.


  1. Enable "offline_access" for the connected application.
  2. Include "refresh_token" (or "offline_access") and "full" in the scope when >generating the refresh token.
  3. Configure the refresh token so that it does not expire.

So I had to go to the connected app -> manage -> edit policies -> Refresh Token Policy: Expire refresh token after 99999 Month(s).

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.