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
Scott W LeonardScott W Leonard 

OAuth2 authorization_code fails: {"error":"invalid_grant","error_description":"authentication failure"}

we have a connected app with a clientid and secret that are used to access the API. we are suddenly (after years of working) getting errors on the authorization_code grant. We successfully get an authorization code, but when we try to retrieve the access token, the call fails with an error: {"error":"invalid_grant","error_description":"authentication failure"}

unfortunately this is the only response we get, and have no other visibility into the issue. We are getting this in our production instance, but other customers who integrate with Salesforce through our platform are getting the same error. In other words, it is not isolated to a single org or user account, but all users trying to authorize us to interact with Salesforce.

I am completely at a loss as to where to go for help, so any guidance is appreciated.

Tuan LuTuan Lu
If you double checked you auth parameters and they work using curl or something like that to request a new new token then it could only be the target URL or the TLS version youre using.