function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
daniel.cecil.devdaniel.cecil.dev 

OAuth2 Refresh Flow - unsupported grant type

Hello,

 

I'm having a couple of problems with OAuth today...

I can authenticate using the Web server flow to obtain an access token along with a refresh token.

 

However, when it comes to refreshing the refresh token I'm always greeted with an unsupported_grant_type error.

 

Here is the request:

Server: https://login.salesforce.com/services/oauth2/token

Headers:

Content-Type: application/json; charset=UTF-8
Accept: application/json

 POST Data:

{"grant_type":"refresh_token","client_id":"MY_CLIENT_ID","refresh_token":"MY_REFRESH_TOKEN"}

Raw Response:

HTTP/1.1 400 Bad Request
Date: Wed, 19 Jun 2013 10:18:38 GMT
Pragma: no-cache
Cache-Control: no-cache, no-store
Content-Type: application/json;charset=UTF-8
Transfer-Encoding: chunked


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

 

Any ideas? The refresh token is brand new.

 

Thanks,

Dan

Jose Eduardo Poma CaceresJose Eduardo Poma Caceres
Hi Daniel,
Test from postman

Do not send content-type from header.
All the content send it on the Body

Best regards.
Jose Eduardo Poma Caceres