Skip to main content
News

Trending Topics: Latest from our forums (March 2025)


paige.rossi
Docusign Employee
Forum|alt.badge.img+1

Here are some of the latest popular questions that developers asked on Docusign Community and Stack Overflow in the month of March 2025. 

Thread: Error when downloading the envelope

https://community.docusign.com/esignature-api-63/error-when-downloading-the-envelope-23190

Summary: The developer is trying to programmatically download envelopes that have already been completed using the EnvelopeDocuments: get endpoint. However, when they download the documents, they find that the fields and signatures completed by the envelope’s recipients are not appearing in the downloaded files.

Answer: Any values of completed tabs will only appear in the downloaded documents if the eSignature sending settings are configured in a way that allows this. Under Sending Settings in the Fields and Properties section, be sure to select the checkbox labeled to When an envelope is sent, write the initial value of the field for all recipients. See the blog post Tabs deep dive: eSignature settings for more information about how eSignature settings can affect fields in your envelopes.

Thread: Need help with capturing E-sign completion event using webhooks

https://community.docusign.com/esignature-api-63/need-help-with-capturing-e-sign-completion-event-using-webhooks-23027

Summary: The developer is using Node.js and is trying to use Docusign Connect to trigger notifications when an envelope has been completed or declined; but, in creating their custom configuration, they found that the URL to publish to is static, and they need this URL to be dynamically generated. Instead, they are taking the approach of configuring their envelope definition to trigger a notification when certain events occur, but they need help configuring this to work properly.

Answer: Because the custom configuration approach will not work for this developer, they are correct in attempting to configure their envelope definition to alert a specific webhook using Docusign Connect. To do this, they need to define the eventNotification property when calling the Envelopes: create endpoint. 

The following code demonstrates how to do this, and you can see the blog post Common API Tasks🐈: Add a Connect Webhook to your Envelopes to find examples in other programming languages.

let envelopeDefinition = new docusign.EnvelopeDefinition();
let eventNotification = new docusign.EventNotification();
// Set up the endpoint URL to call (it must be using HTTPS and at least TLS1.1 or higher)
eventNotification.url = 'https:\\myapp.somedomain.com';
// Docusign will retry on failure if this is set
eventNotification.requireAcknowledgment = 'true';
// This would send the documents together with the event to the endpoint
eventNotification.includeDocuments = 'true';
// Allow you to see this in the Docusign Admin Connect logs section
eventNotification.loggingEnabled = 'true';
let envelopeEvents = [];
// In this case we only add a single envelope event, when the envelope is completed. You can also add events for recipients
let envelopeEvent = new docusign.EnvelopeEvent();
envelopeEvent.envelopeEventStatusCode = 'completed'; 
envelopeEvent.includeDocuments = 'true';
envelopeEvents.push(envelopeEvent);   
eventNotification.envelopeEvents = envelopeEvents;
envelopeDefinition.eventNotification = eventNotification;

Thread: I am trying to connect to Docusign through my WebApp and my JWT is failing - "kid" invalid

https://stackoverflow.com/questions/79491777/i-am-trying-to-connect-to-docusign-through-my-webapp-and-my-jwt-is-failing-ki

Summary: The developer is trying to use JSON Web Token (JWT) Grant authentication in their PHP web app. When exchanging the JWT for an access token, they keep receiving an error that reads, Decoding JWT did not work UnexpectedValueException: "kid" invalid, unable to lookup correct key. They shared the following code block to get some help debugging.

$now = time();
$payload = [
    'iss' => $clientId,
    'sub' => $apiUserId,
    'aud' => 'account-d.docusign.com',
    'scope' => 'signature impersonation',
    'iat' => $now,
    'exp' => $now + 3600 // 1 hour expiration
];
$privateKey = file_get_contents($privateKeyFilePath);
$jwt = JWT::encode($payload, $privateKey, 'RS256', $keypairID); //kid
$publicKey = file_get_contents('publicKey.key');

Answer: The issue with the developer’s code is that they are saving their public key as a string rather than as an object of type Key. They can resolve this by changing the last line in the code block above to match the following code:

$publicKey = new Key(file_get_contents('publicKey.key'), 'RS256');

Additional resources

Is this content helpful?
This topic has been closed for comments