Cas
Cas

Reputation: 758

authentication failure when sending envelope

I'm working on a DocuSign implementation that sends envelopes based on templates. For this I have to manually write my requests since our framework is incompatible with the provided Java SDK. Unfortunately, I am running into an error when actually attempting to send the envelope.

Our application impersonates another user since it will run on a server, the entire authentication flow seems to work (I got it working to the point where I have a JWT for the API)

In order to create a new envelope I use the following request body:

POST /v2.1/accounts/<accountId>/envelopes/ HTTP/1.1
Host: https://demo.docusign.net/restapi
Authentication: Bearer eyJ0e.....
Content-Type: application/json

{
  "recipients": {
    "signers": [
      {
        "email": "[email protected]",
        "name": "John Doe",
        "roleName": "Representative 1",
        "tabs": {
          "textTabs": [
            {
              "tabLabel": "testLabel",
              "value": "this is a pre-filled label"
            }
          ]
        }
      }
    ]
  },
  "status": "created",
  "templateId": "ba0ddc8e-648e-41f7-b4e5-56abf0073c8a"
}

I think this request is valid and complies with what I've found in the documentation. However, after sending it, I receive the following response:

{
    "errorCode": "PARTNER_AUTHENTICATION_FAILED",
    "message": "The specified Integrator Key was not found or is disabled. An Integrator key was not specified."
}

This makes me believe that I am using an incorrect integrator key, but I triple checked and the integrator key I am using matches the one I can see in the DocuSign admin panel.

What can I do to make this request work?

Thanks.

Upvotes: 1

Views: 103

Answers (1)

Drew
Drew

Reputation: 5029

If you're getting "An integrator key was not specified", then the issue is likely that DocuSign isn't seeing your Authorization header, or it's not able to interpret it correctly.

In looking at the headers of your call, it looks like you're incorrectly using Authentication when you should be using Authorization

Upvotes: 1

Related Questions