1
votes

I am making an API Call to Docusign to try to get a link for a recipient to sign his document without him having to go into his e-mail. I am doing this in APEX in a Visualforce page.

I am sending the following request to the endpoint: "https://demo.docusign.net/restapi/v2/accounts/661863/envelopes/21F02F6C-E156-46E0-BCDE-778D18DB4592/views/recipient"

My Request is:

{
  "authenticationMethod": "email",
  "email": "[email protected]",
  "returnUrl": "www.docusign.net",
  "userName": "LB -1 Demo 2"
}

The response I am getting is:

{
  "errorCode": "UNKNOWN_ENVELOPE_RECIPIENT",
  "message": "The recipient you have identified is not a valid recipient of the specified       envelope. Envelope recipient could not be determined. 'clientUserId', 'email', or 'userName' in request and envelope may not match."
}

The envelope request is:

{
  "signers": [
    {
      "name": "LB -1 Demo 2",
      "email": "[email protected]",
      "recipientId": "1",
      "requireIdLookup": "false",
      "userId": "05b324da-8ebb-4d4b-a58b-0ef019530214",
      "routingOrder": "1",
      "roleName": "Signer 1",
      "status": "completed",
      "signedDateTime": "2014-06-24T11:30:09.4630000Z",
      "deliveredDateTime": "2014-06-24T11:29:58.5100000Z"
    }
  ],
  "agents": [],
  "editors": [],
  "intermediaries": [],
  "carbonCopies": [],
  "certifiedDeliveries": [],
  "inPersonSigners": [],
  "recipientCount": "1",
  "currentRoutingOrder": "1"
}

The recipient information seems to match my request but the API call is still not working. Is this because I am missing a clientUserId and that is required for am embedded signing call? And if so, would I need to create the Envelope AND Recipients AND ONLY THEN can I make the embedded signer call?

1
possible duplicate of Docusign Embedded SigningAndrew
You are correct, you need a clientUserId and you can only get a recipient token for a recipient with clientUserId. More information in this answer: stackoverflow.com/a/17558969/1612605Andrew

1 Answers

0
votes

This question is a duplicate, please search the DocuSignApi tag for existing answers before posting new questions. As Andrew has mentioned, this is a duplicate of this question:

Docusign Embedded Signing

You need to set the clientUserId property for any recipient who you want to be an embedded recipient. It's up to you what value to use, but make sure you include the same exact value when requesting the signing URL token.

There's also a detailed explanation of this on the DocuSign Developer Center under Features -> Embedding

https://www.docusign.com/developer-center/explore/features/embedding-docusign