Refresh Token Policy locked to immediatly expire token

All we need is an easy explanation of the problem, so here it is.

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

Thanks.

How to solve :

I know you bored from this bug, So we are here to help you! Take a deep breath and look at the explanation of your problem. We have many solutions to this problem, But we recommend you to use the first method because it is tested & true method that will 100% work for you.

Method 1

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

Method 2

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.

http://help.boomi.com/atomsphere/GUID-1F4A2873-2CD4-46DA-AE69-DD42823DE0E7.html

  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).

Note: Use and implement method 1 because this method fully tested our system.
Thank you 🙂

All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply