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?
Thanks.
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It only takes a minute to sign up.
Sign up to join this communityI 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 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
- Enable "offline_access" for the connected application.
- Include "refresh_token" (or "offline_access") and "full" in the scope when >generating the refresh token.
- 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).