Skip to main content
New Voice
June 12, 2024
Solved

Invalid Grant unauthorized Client

  • June 12, 2024
  • 5 replies
  • 2365 views

 

After changing my development account to a production account, the last step was to get this authorization code. I allowed access (granted permission) and tested it in Postman. I keep receiving this 400 error “Invalid Grant” “ Unauthorized Client”. 

 

Has anyone encountered this error before? 

Best answer by JohnSantos

@LWMyer 

The error message "invalid_grant" with the description "unauthorized_client" typically occurs during the OAuth 2.0 authorization process, indicating that there is an issue with the client credentials or permissions.

After you approve consent are you copying the return URL from the equal sign on..something like this but with a lot of characters. https://www.example.com/redirect?code=eyJ0eXAiOiJNVCIsImFsZyI6IlJTMjU2Iiwia2lkIjoiNjgxODVmZjEtNGU1MS00Y2U5LWFmMWMtNjg5ODEyMjAzMzE3In0.AQoAAAABAAYABwCAtMBJGiHcSAgAgEBHkRoh3EgCAE1

Also, make sure you are using the correct grant type. The error suggests that there might be a mismatch in the grant type being used and what is expected. Typically, this error is seen when using the Authorization Code Grant.

5 replies

Michael.Rave
Docusign Employee
Docusign Employee
June 12, 2024

@LWMyer

Can you confirm you followed the go-live process to promote the integration key to the production environment? You also need to update the user Id, the account Id and the base URI to production as all of these values will be different to the demo environment.

You need to do all steps, including consent again in the production environment after the promotion of the integrator key.

"Select as Best" below if you find my answer is a valid solution to your issue and mark it as resolved.
LWMyerNew VoiceAuthor
New Voice
June 12, 2024

Yes I went through and completed every step in the Go Live Process. 

 

Right now I am stuck on Step 2 

 

When trying to obtain the access token, I approve consent and that is where my error occurs. 

{

    "error": "invalid_grant",

    "error_description": "unauthorized_client"

}

JohnSantos
Guru
Guru
June 14, 2024

@LWMyer 

The error message "invalid_grant" with the description "unauthorized_client" typically occurs during the OAuth 2.0 authorization process, indicating that there is an issue with the client credentials or permissions.

After you approve consent are you copying the return URL from the equal sign on..something like this but with a lot of characters. https://www.example.com/redirect?code=eyJ0eXAiOiJNVCIsImFsZyI6IlJTMjU2Iiwia2lkIjoiNjgxODVmZjEtNGU1MS00Y2U5LWFmMWMtNjg5ODEyMjAzMzE3In0.AQoAAAABAAYABwCAtMBJGiHcSAgAgEBHkRoh3EgCAE1

Also, make sure you are using the correct grant type. The error suggests that there might be a mismatch in the grant type being used and what is expected. Typically, this error is seen when using the Authorization Code Grant.

Welcome to the DocuSign Community! Your feedback is highly valued. If you find my response helpful, please give it a "Like" and consider marking it as the "Best Answer" to assist others with similar issues.
Docusign Employee
June 29, 2024

Hi @LWMyer,

 

I hope you are doing well.

 

I would like to confirm if you were able to solve your issue by utilizing the solution that was suggested? 

 

If so, please mark it as the best answer by clicking “Select as Best” to make it easier for other users to find.

 

Otherwise, feel free to let me know and I will gladly help you address the situation as soon as possible.

 

Best regards,   

Alejandro R. | Docusign Community Moderator   

"Select as Best" below if you find the answer a valid solution to your issue!   

 

Newcomer
December 8, 2025

i am getting same issue 

{

    "error": "invalid_grant",

    "error_description": "expired_client_token"

}  even when the integrationkey, secret and then token getting generate from https://account-d.docusign.com/oauth/auth?response_type=code&scope=signature is correct.

grant_type=authorization_code