15

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.

2 Answers 2

29

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

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

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

1
  • Step 2 did it for me, such a key piece of information not found ANYWHERE. Thanks @kyle-s
    – leog
    Nov 14, 2022 at 18:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .