[SalesForce] unsupported grant_type

When I'm executing a web service on "Advanced REST client (a chrome extension)", I'm getting this error constantly. I do need to get "access_token"

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

And I'm passing my username, password (password+Security token), client_id, client_secret and grant_type(=password).

The url is https://ap1.salesforce.com/services/oauth2/token

Best Answer

The content-type HTTP header should be application/x-www-form-urlencoded - Check if that's set correctly. If not, you will get this error. Also, make sure The grant_type form parameter is set to your password (all lower case)