Prerequisite: Install the connected app in Setup > Connected Apps OAuth Usage.
To ensure that Refresh Token Policy Is NOT set to Immediately expire refresh token:
-
In Salesforce, on the left side, in the search box, enter "App manager" (without the quotation marks).
-
In the left pane, select App Manager.
-
In the right pane, to the right of the connected app you defined, select the drop-down list. Choose Manage.
-
Near the top of the displayed connected app, select Edit Policies.
-
Under OAuth policies, ensure that Refresh Token Policy is NOT set to Immediately expire refresh token.
-
Select Save.