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
Dheeraj shokeenDheeraj shokeen 

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

How can resolve this Invalid Grant acces?
password combination are correct  Password+resttoken

But getting error? anyway find that issue
 
SwethaSwetha (Salesforce Developers) 
Hi Dheeraj,

To resolve the "invalid_grant" error with an "authentication failure" description in Salesforce, you try these troubleshooting steps:

>> Ensure that the Connected App in Salesforce is properly configured. Check the following settings:
- Verify that the "OAuth Scopes" are correctly configured to grant the necessary access permissions.
- Confirm that the "Callback URL" is set correctly and matches the redirect URL in your authentication request.
- Make sure that the "Refresh Token Policy" is set appropriately based on your requirements.

>> Ensure that the user account you are using to authenticate has the necessary permissions to access the Salesforce resources you are trying to access. Check the user's profile and permission sets to verify the required permissions are granted.

>>Double-check that you are making the authentication request to the correct Salesforce authentication endpoint. The endpoint should be in the format: https://login.salesforce.com/services/oauth2/token for production instances or https://test.salesforce.com/services/oauth2/token for sandbox instances.

>> In your case, you mentioned that the password combination is correct (Password+resttoken). However, ensure that you are providing the credentials in the correct format and that there are no additional spaces or special characters causing issues.

>> If your Salesforce organization has IP restrictions enabled, make sure that the IP address from which you are making the authentication request is allowed. You may need to add the IP address to the trusted IP range in Salesforce.

>> If your Salesforce organization requires a security token for API authentication, ensure that you are appending the security token to the end of the password. The security token can be obtained from the user's Salesforce settings.

>> Check the Salesforce API version you are using in your authentication request. Make sure it is compatible with the Salesforce instance you are connecting to. It is recommended to use the latest API version supported by your Salesforce instance.

>> Ensure that API access is enabled for the user account you are using to authenticate. Go to the user's profile settings and verify that the "API Enabled" checkbox is checked.

Related: https://developer.salesforce.com/forums/?id=906F000000099liIAA
https://salesforce.stackexchange.com/questions/339872/errorinvalid-grant-error-descriptionauthentication-failure
https://www.useparagon.com/integration-error-solutions/salesforce-invalid-grant-authentication-failure
https://stackoverflow.com/questions/34154385/getting-errorinvalid-grant-error-descriptionauthentication-failure-i
https://www.infallibletechie.com/2022/12/invalidgrant-authentication-failure-salesforce-exception.html

If this information helps, please mark the answer as best. Thank you