This question already has an answer here:

I am attempting to obtain a token, using the Oauth 2 refresh token flow.

I am using the REST Console in Chrome to perform the following POST operation:

My URI is https://cs11.salesforce.com/services/oauth2/token

My Content-Type header is "application/json"

I am posting the following body (client id and secret omitted)

,"redirect_uri": "https://"

From what I gather from the saleforce oauth2 refresh token flow documentation, this should work. However, I am getting the following error for a response:

    "error_description": "grant type not supported",
    "error": "unsupported_grant_type"

Any thoughts on why the service doesn't like my grant_type parameter?

marked as duplicate by Boris Bachovski, Samuel De Rycke Feb 4 '15 at 23:11

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


Refresh flow uses application/x-www-form-urlencoded content type, not application/json, with a body of the form


Here's a test I just ran, with credentials removed, and formatting added:

$ curl -d 'grant_type=refresh_token&client_id=<CLIENT_ID>&client_secret=<CLIENT_SECRET>&refresh_token=<REFRESH_TOKEN>' https://login.salesforce.com/services/oauth2/token
    "scope":"id api refresh_token",
  • 3
    This is also the same for grant_type=authorization_code. You need to have the Content-Type header set to application/x-www-form-urlencoded and not application/json. – toobsco42 Jun 14 '15 at 9:02

Not the answer you're looking for? Browse other questions tagged or ask your own question.