docusign / docusign-esign-python-client

The Official DocuSign Python Client Library used to interact with the eSign REST API. Send, sign, and approve documents using this client. https://www.docusign.com/devcenter
MIT License
97 stars 88 forks source link

EventNotification: webhook doesn't get data in the json format #179

Closed sks444 closed 1 year ago

sks444 commented 1 year ago

Hey, thank you so much creating this amazing library in python!

I am working on per-envelope webhook and this is what I've in my EventNotification. But even after mentioning the format of the data in event_data, I'm still getting the data in xml format in my webhook.

    event_notification = EventNotification(
        url="https://afd5-103-210-48-215.ngrok-free.app/envelope-status-change",
        logging_enabled="true",
        require_acknowledgment="true",
        use_soap_interface="false",
        include_certificate_with_soap="false",
        sign_message_with_x509_cert="false",
        include_documents="false",
        include_envelope_void_reason="true",
        include_time_zone="true",
        include_sender_account_as_custom_field="true",
        events=[
            "envelope-sent",
            "envelope-completed",
        ],
        event_data=ConnectEventData(
            format="json",
            version="restv2.1",
            include_data=["status"]
        )
    )

Any information on why this might be happening would be really helpful, as I seem to can't figure this out..in terms of debugging is it possible to check the per-envelope configurations(that we set via the api) in docusign web app?

Thank you!

sks444 commented 1 year ago

I figured it out, going through the documentation again at https://developers.docusign.com/platform/webhooks/connect/json-sim-event-model/

I had missed the argument delivery_mode="SIM",