Skip to main content
Newcomer
October 8, 2024
Question

UNKNOWN_ENVELOPE_RECIPIENT

  • October 8, 2024
  • 2 replies
  • 1105 views

When trying to create recipent view url from an envelope created from a template i recieve this error.

How does one idenify the valid recipient?
 

UNKNOWN_ENVELOPE_RECIPIENT

The recipient you have identified is not a valid recipient of the specified envelope.

using PHP SDK

 

$envelopeDefinition = new EnvelopeDefinition();$envelopeDefinition->setEmailSubject("Please Sign this Document");$envelopeDefinition->setTemplateId('f8c7bf7d-xxxx-1201e093fdc9');$envelopeDefinition->setStatus('created');$envelopeDefinition->setTemplateRoles([$signerTemplate]);
$recipient_view_request = new RecipientViewRequest([    'assertion_id'=> $assertion,    'authentication_method' => 'none',    'client_user_id' => $GLOBALS['JWT_CONFIG']['ds_impersonated_user_id'],    'return_url' => 'https://localhost', // Where to redirect after signing    'user_name' => $name,    'email' => $email,]);
try {    $envelopeSummary = $envelopesApi->createEnvelope($accountId, $envelopeDefinition);    echo "Envelope has been created with ID: " . $envelopeSummary->getEnvelopeId();} catch (Exception $e) {    echo 'Error while creating envelope: ',  $e->getMessage(), "\n";}
// Generate the recipient view URLtry {    $view_url = $envelopesApi->createRecipientView(        $accountId,        $envelopeSummary->getEnvelopeId(),        $recipient_view_request    );} catch (\DocuSign\eSign\ApiException $e) {    echo $e->getMessage();}

2 replies

Inbar.Gazit
Docusign Employee
Docusign Employee
October 17, 2024

Does
 

'user_name' => $name, 'email' => $email,]);


match one of the recipients?
Since you’re using a template, I'm not sure what are the recipients you pass into the template.

Newcomer
January 9, 2025

I’m seeing a similar issue, but we’re sending the username and email data we got from ListRecipients for the envelope.  We suspect this is caused by the signer changing their name after the envelope was initially created.