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(e$signerTemplate]);
$recipient_view_request = new RecipientViewRequest(s 'assertion_id'=> $assertion, 'authentication_method' => 'none', 'client_user_id' => $GLOBALSA'JWT_CONFIG']G'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();}