Reputation: 25
I call the GET envelope recipients API https://demo.docusign.net/restapi/v2.1/accounts/cf70dfa7-a861-4029-b149-5360c090ebfa/envelopes/4de0ca11-e07b-4ff0-936f-cdd37ff18ed2/recipients and it returns clientUserId, userId, email, etc. Odd thing is even though I'm sending it to myself, it returns a different user id than the one I sent with.
{
"signers": [
{
"creationReason": "sender",
"isBulkRecipient": "false",
"recipientSuppliesTabs": "true",
"requireUploadSignature": "false",
"name": "michael",
"firstName": "",
"lastName": "",
"email": "[email protected]",
"recipientId": "2", //idk why this is 2
"recipientIdGuid": "smth",
"requireIdLookup": "false",
"userId": "fdbb65f9-ea71-4e59-8374-0e1952c70e0a",
"clientUserId": "random",
"routingOrder": "1",
"roleName": "signer",
"status": "sent",
"completedCount": "0",
"deliveryMethod": "email",
"recipientType": "signer"
}
],etcetc
}
Using those I call the POST /view/recipient API and insert all those same things
{
"authenticationMethod": "HTTPBasicAuth",//I've tried this and password
"clientUserId": "random",
"email": "userid", //Tried both user ID's, and email + name, didnt work
"recipientId": "2", //same as above
"returnUrl": "http://localhost:3001/marketplace",
"userName": "userid"//tried same thing, and leaving this blank, gave another error
}
but it gives the error code
{
"errorCode": "UNKNOWN_ENVELOPE_RECIPIENT",
"message": "The recipient you have identified is not a valid recipient of the specified envelope."
}
Upvotes: 0
Views: 190
Reputation: 14050
Here is what your second call should be based on your first call:
{
"authenticationMethod": "none",
"clientUserId": "123456",
"email": "[email protected]",
"returnUrl": "http://localhost:3001/marketplace",
"userName": "michael"
}
Upvotes: 0