Is there a way to retrieve refresh_token via https://test.salesforce.com/services/oauth2/token REST API call?

I've seen it's possible via connected app but we want to retrieve the refresh token via standard user/password login:


Is this possible?


1 Answer 1


Refresh tokens are part of the OAuth 2.0 spec, and to use OAuth with Salesforce (at least the OAuth services that Salesforce provides out of the box), you need a connected app. This is true even for the username-password flow, which you shouldn't be using in general, which is demonstrated by the inclusion of the client id and secret in your example.

The JWT Bearer and Username-Password flows do not generate refresh tokens, so what you're asking for is not possible.

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.