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
Suganya SubrayanSuganya Subrayan 

I got the error response {"error":"invalid_grant","error_description":"authentication failure"}

I have passed the below param.

 
"client_id", "XXX"
"client_secret", "YYY"
"grant_type", "password"
"username", "$$$"
"password", "###"

what's am i missing?

Advance thanks
GulshanRajGulshanRaj
Please follow the section "Testing REST web service using POSTMAN Client" on this url http://www.vinaychaturvedi.com/blog/learn-how-to-test-your-rest-apis-in-salesforce/

This is really good article.

Thanks
Gulshan Raj
Purushotham YellankiPurushotham Yellanki
Hi Suganya,

Try adding your Security Token to your Password and see if that works. The Identity Confirmation section has more detailed information under help topics, please go through them




Thank you
Suganya SubrayanSuganya Subrayan
ok thanks for your immediate response.. I have tried but i got same error like below

{"error":"invalid_grant","error_description":"invalid authorization code"}

"client_id", "XXX"
"client_secret", "YYY"
"grant_type", "password"
"username", "$$$"
"password", "zr2veDizcDp7ASDADASDASD"
 
Suganya SubrayanSuganya Subrayan
Sorry..now i got the security token from salesforce..

Thanks for your response
Neeraj Sharma 167Neeraj Sharma 167

Hi Suganya 

There is one more setting is important to configure the integration between two salesforce orgs that should be enabled 'Allow OAuth Username-Password Flows' when getting invalid grant error 

User-added image