2

I am trying to get aouth token from using the username and password authentication for Salesforce rest api.

I am using this url: https://login.salesforce.com/services/oauth2/token

I am using this Header:

grant_type: password
content-type: application/x-www-form-urlencoded
client_id: 3MVG9Y6d_Btp4xp7vvFtoM5KvlxGGeHkTNHMBRocXHDKgrY.**********************
client_secret: 77228**********
username: ******@****.com
password: ********ESbfkvMHuULtcEROf6CNiMRZ

I am also giving the accesstoken in the password. but I am always getting this:

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

enter image description here

2
  • can you post your code ?the first step should be to obtain access token Dec 31, 2013 at 4:56
  • i am using a tool for rest post callouts called: Advance rest client(chrome plugin)
    – user614946
    Dec 31, 2013 at 5:15

1 Answer 1

1

instead of using this Endpoint https://login.salesforce.com/services/oauth2/token

Change your Endpoint to https://[Your salesforce instance].salesforce.com/services/oauth2/token

Example :https://ap1.salesforce.com/services/oauth2/token

9
  • I did that but same result!!
    – user614946
    Dec 31, 2013 at 5:30
  • I got the Result in POSTMAN Client ..am not able to understand why u r not getting it
    – Vineeth
    Dec 31, 2013 at 5:52
  • even tried it in POSTMAN client same result, what Header values are you using???
    – user614946
    Dec 31, 2013 at 6:07
  • client_id ,client_secret,grant_type,username,password
    – Vineeth
    Dec 31, 2013 at 6:11
  • what did u entered in u r Callback URL ?
    – Vineeth
    Dec 31, 2013 at 6:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .