I'm trying to integrate DocuSign in our system. What I understood from the documentation is that we need to use JWT Authentication, because we ask organisation administrator for permission, and then, the users do not need to login when requesting a signature.
This is the url I use to obtain the admin consent:
The callback URL is called successfully with a code returned like this:
Callback_URL?state=esignature_docusign&code=ConsentResponseCode
However, there are two problems here:
- The
ConsentResponseCodeis a valid code in JWT format, but the payload is empty and the header looks like this:
{
"typ": "MT",
"alg": "RS256",
"kid": "68185ff1-xxxx-xxxx-xxxx-689812203317"
}
- If I use that code to perform Authorization Grant login, it returns the error (even a few seconds after I receive the
ConsentResponseCode):
{
"error": "invalid_grant",
"error_description": "expired_client_token"
}
which is blocking us from look up the user by email.
Questions are:
How can I obtain UserID to create JWT request?
Do I need to obtain consent separately and perform an Authorisation Grant for the organisation admin account?