Senthil Raj
Senthil Raj

Reputation: 71

DocuSign sends notification to requested URL, but I am not able to receive it

I have set my envelope to receive envelope events notification. I am using Rails and the Docusign_REST gem along with it.

By checking the Connect logs on the DocuSign system, I see that DocuSign has sent the notification, but my server has not processed it. Any additional information would be helpful.

event_notification: {
        url: "<MY_REQUEST_URL>",
        logging: true,
        envelope_events: [
          {
            include_documents: false,
            envelope_event_status_code: "Sent"
          },
          {
            include_documents: false,
            envelope_event_status_code: "Completed"
          },
          {
            include_documents: false,
            envelope_event_status_code: "Delivered"
          }
        ]
      },

Upvotes: 0

Views: 275

Answers (1)

Larry K
Larry K

Reputation: 49104

The Basics

You're using a "webhook." You registered a url with DocuSign. The DocuSign platform will call your webhook url when your envelope(s) change state.

Diagnosing the problem

You know that DocuSign is attempting to send you (at your "webhook_url") the notification messages by looking at the "Connect" message log in the DocuSign Admin tool. -- And you can use the Admin tool's "Resend" button to easily resend a notification as a test.

Since you know DocuSign is trying to send to you, the problem is somewhere on your system. I would do the following to diagnose the issue:

  1. Assume your webhook_address is something like "http://my-server.com/my_app/webhook" Did you register the entire url with DocuSign? Don't leave out the http or https! (https is required in production but not in the developer sandbox)
  2. Look at your incoming server logs. You should see the POST requests coming in from DocuSign. If you don't then check firewalls, availability of your webhook address on the internet, etc.
  3. Is your webhook_url available from the public internet? You can test by using the www.hurl.it service. Since hurl.it will be sending an empty request body, your listener will probably choke. Of course, if you fire-proofed your listener to check for empty request bodies, good for you.
  4. If you're running webbrick or another Ruby webserver on your own development machine, then you need an address on the public internet since DocuSign can't send directly to your development machine. ngrok (and similar apps) are a good solution for that. Run ngrok on your local machine and give it your localhost port number of your Ruby server. ngrok will then give you a url on the public internet that you can use with DocuSign.
  5. For development, your webhook listener url can use http or https. Your SSL cert must have a trust path to one of the usual trusted root certs. (The Mozilla list). It is fine to use a $4 cert. No need to use an Extended Validation cert or similar. Do not use a self-signed cert. It won't be trusted by the DocuSign platform and you will not receive notifications via your webhook.

Upvotes: 1

Related Questions