Skip to main content
Question

Docusign JWT Grant - Not Returning code as typ : JWT

  • April 3, 2025
  • 1 reply
  • 17 views

Forum|alt.badge.img

Created App and Key with Redirect URI and RSA Key Pair. Sent request in format https://account-d.docusign.com/oauth/auth?
    response_type=code
    &scope=YOUR_REQUESTED_SCOPES
    &client_id=YOUR_INTEGRATION_KEY
    &redirect_uri=YOUR_REDIRECT_URI. Replacing with my value. Code returned is of typ:MT and Payload is not JSON format. Instead it is in binary format

1 reply

Forum|alt.badge.img+3
  • Docusign Employee
  • 24 replies
  • April 14, 2025

Hi Kanika,

I’m the with the DocuSign Dev/API team.

I understand that you’re receiving the payload in binary format.

 

To debug the issue with your OAuth 2.0 flow, begin by verifying the accuracy of your request parameters. Ensure that you have specified response_type=code since you are requesting an authorization code. Validate the requested scope, confirm the accuracy of your client_id (integration key), and check that it is registered with the OAuth provider. Additionally, verify that the redirect_uri in your request matches the one registered with your provider.

 

After sending the request, please examine the HTTP response. Check the HTTP status code (e.g., 200 OK) to confirm if the request was successful. Verify that the Content-Type of the response is as expected (usually application/json). If the payload is binary, check if it is encoded (e.g., base64) and decode it to understand the content.

 

If you anticipate an authorization code to be returned after the user grants or denies permission, ensure that the server redirects to your redirect_uri and includes the code parameter in the URL. The redirect URL should resemble https://YOUR_REDIRECT_URI?code=AUTHORIZATION_CODE. Make sure that you are correctly extracting the code from the redirect URL. If the returned code appears encoded or has an unusual format (e.g., MT), it might be base64 encoded; try decoding it to see if it yields more useful information.

 

Furthermore, consult your OAuth provider’s documentation to ensure that you are handling the flow correctly. Review any server logs that may indicate why the response is in an unexpected format. If needed, use tools like Postman or curl to manually test the authorization flow and inspect the response to ensure it is in the correct format. By following these steps, you can identify and address issues with the request and response, ensuring that the proper authorization code is returned in a readable format.

 

Best,

DocuSign Support

 


Reply