Search code examples
docusignapidocusign-sdk

Docusign CreateEnvelop does not return


When I try and send an envelop through email (docusign test sandbox), my test application sends the envelop, yet api call is not returned. I enabled clientUserId so I can get the URL for redirecting end user, unable to get to this stage as CreateEnvelope calls is never returned.

What is strange is that the same app works fine through my local machine, when integrating it in the server where my test app is hosted, it does not return and shows no error.

Any clue would be greatly appreciated!

AccountID = API Account ID 
IntegerationID = IntegerationID 
signerClientId = random number I assigned for testing purposes,
passed to both MakeEnvelope and MakeRecipientViewRequest 

I use JWT to get accessToken without the need to login to DocuSign I handled the consent on my account outside the app (one time consent approved)

EnvelopeDefinition envelope = MakeEnvelope(signerEmail, signerName, signerClientId);
 var docuSignClient = new DocuSignClient(basePath);
 List<string> scopes = new List<string>();
 scopes.Add("signature impersonation");
      

 byte[] bytes = Encoding.ASCII.GetBytes(privateKeyStr);

  string accessToken = (docuSignClient.RequestJWTUserToken(IntegerationId, userId, oauthBasePath, bytes, 3600, scopes)).access_token;

EnvelopesApi envelopesApi = new EnvelopesApi(docuSignClient);

EnvelopeSummary results = envelopesApi.CreateEnvelope(accountID, envelope); //this never returns 
string envelopeId = results.EnvelopeId;

Expecting a envelopID to be returned

Using .net framework 4.7.2 docusign sdk


Solution

  • I have been having the same issue. After banging my head against a brick wall for half a day, I eventually found this: https://github.com/docusign/docusign-esign-csharp-client/issues/399.

    Updating the SDK to 6.4.1 solved the problem.