3

When i try to get access token by calling the below url from Chrome Rest Client

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

by passing all headers

grant_type: password
username: [email protected]
password: *****+SecurityToken
client_id: 3MVG9ZL0ppGP5UrAK9L_2UlHYwS_Zi1B_vyAIzVVE4jOdt4i.aJCYuioKS7VsCuokwWAm2uIZKSms
client_secret: 5435274860481357
Content-Type: application/x-www-form-urlencoded

In connected app i have given return url as http://localhost

But i am getting response as

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

Is there a way to come out of this and call rest services using rest client

Rest Client Snap Shot enter image description here

3
  • can you update this question with your rest client screenshot? what is the client name you are using.
    – Himanshu
    Oct 28, 2015 at 10:42
  • @Himanshu i have updated my question with rest client screen shot
    – Rajasekhar
    Oct 28, 2015 at 10:46
  • you are passing them as header parameter. you will pass them as form data instead of header. please check the updated answer.
    – Himanshu
    Oct 28, 2015 at 10:51

1 Answer 1

2

You need to make change of your request type. Make sure it is POST instead of GET

enter image description here

Make sure you are passing parameter as form data instead of Header data

enter image description here

1
  • thanks this worked i am sending values in headers now i changed it ...
    – Rajasekhar
    Oct 28, 2015 at 10:54

You must log in to answer this question.

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