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
Joe Meredith 7Joe Meredith 7 

Invalid grant when using x-www-form-urlencoded for post request

I'm trying to generate an access token and it generates fine when using the "form-data" option in post-man. However, we have a client who is only able to use x-www-form-urlencoded in their post request and using this method returns the below error:

    "error": "invalid_grant",
    "error_description": "authentication failure"

I am including the password and security token (concatanated) in the request and I cant figure out why it would work using form-data but not form-urlencoded

Any help greatly appreciated!

VinayVinay (Salesforce Developers) 
Hi Joe,

Check similar issue below for authentication failure error.

Please mark as Best Answer if above information was helpful.

Rosie RosieRosie Rosie
I will try to figure it out for more.
Hi Joe Meredith 7

First login and check that user login hisroty by which you are trying to login. Check their for specific error message.
If still showing invalid grant try to reset password and do again. sometimes multiple wrong request leads to use lock.
If you can share the request details that will help to debug issue.

Arawind Mundankar