I'm using Webhooks to receive and download the documents of an envelope after it is completed, but I am getting the following error from the Webhook logs:
Error: Exception in EnvelopeIntegration.RunIntegration: e6c44c18-aedf-424d-b6d5-19ad9db635e3 :: {{WEBHOOK_POST_URL}} :: Error - The remote server returned an error: (413) Request Entity Too Large.
The EventNotification I'm passing to the envelope is as follows:
const eventNotification = docusign.EventNotification.constructFromObject({
url: {{WEBHOOK_POST_URL}},
loggingEnabled: true,
requireAcknowledgment: true,
envelopeEvents: [
{
envelopeEventStatusCode: 'completed',
includeDocuments: true,
},
],
});
I suspect it is because the document being received is too large, and the POST request being made by the webhook is being rejected by the server, but I'm not quite sure what the best approach to solving this is. Any help is greatly appreciated!