+ Start a Discussion
SFDC consultant integratiSFDC consultant integrati 

error invalid_grant , authentication failure.

i am failed to login to salesforce through api
I am getting error invalid_grant , authentication failure.
Vasani ParthVasani Parth
First, log into salesforce and view that user's record.  Look for the login history related list and see if that gives you any more details on why the authentication is failing.

Also, does the user have the API permission enabled?

Otherwise, verify the username (and password security token) are correct.  (PasswordSecurityToken is all one string, no + or space in between, if that helps)

Please mark this as the best answer if this helps
deepak_naikdeepak_naik
Is there an IP restriction or Login Hour restriction for the account your are trying ?
 
Prasad RaghavendraPrasad Raghavendra
@Vasani Parth
"PasswordSecurityToken is all one string, no + or space in between, if that helps"
This actually saved hours of my efforts. I was reading some blog and that person had used +. I removed it and it is working really well.