Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CreateRecipientViewAsync is returning UNKNOWN_ENVELOPE_RECIPIENT when trying to create a second one #446

Open
LSPsyko opened this issue Jun 13, 2024 · 2 comments
Labels
area-api all issues related to eSign api

Comments

@LSPsyko
Copy link

LSPsyko commented Jun 13, 2024

Hi,
When trying to recreate an ViewUrl for an envelop, I got the "CreateRecipientViewAsync is returning UNKNOWN_ENVELOPE_RECIPIENT". It works for the first time but not a second opening

Thks, code below

 ```
   EnvelopesApi envelopesApi = CreateEnvelopApi();
        //var envelop = await envelopesApi.GetEnvelopeAsync(_account!.AccountId, existingEnveloppe.EnvelopeId);

        var recipients = await envelopesApi.ListRecipientsAsync(_account!.AccountId, existingEnveloppe.EnvelopeId);
        var signer = recipients.Signers.FirstOrDefault(x => x.Email == student.Email);
        var token = _configuration.GetOptions<DocusignOptions>().ApiKey;
        string returnUrl = $"{_configuration.GetOptions<DocusignOptions>().ReturnUrl}/dsreturn?studentId={studentId}&envelopId={existingEnveloppe.EnvelopeId}&token={token}";

        var viewRequest = new RecipientViewRequest
        {
            ReturnUrl = returnUrl,
            ClientUserId = signer.ClientUserId,
            UserId = signer.UserId,
            Email = signer.Email,
            AuthenticationMethod = "none",
            //RecipientId = signer.RecipientId,
            
        };
        ViewUrl? embedded = await envelopesApi.CreateRecipientViewAsync(_account.AccountId, existingEnveloppe.EnvelopeId, viewRequest);
 
        return embedded.Url;
@esilva600
Copy link

Hello,

The error UNKNOWN_ENVELOPE_RECIPIENT happens when you try to use a different recipient from the ones that exist in the envelope.

Another cause is when someone changes the Recipient Name, for example, they insert or remove initials or use nicknames as their usernames.

For example, if you create a Recipient named Howard Philips and then it is updated to H. P. Lovecraft, it will cause the unknown_envelope_recipient Error.

To correct this you will need to delete the Envelope Recipient views, and then create a new Recipient View for this Envelope Recipient.

Below is the code sample to delete the Recipient View:
https://developers.docusign.com/docs/esign-rest-api/reference/envelopes/envelopeviews/deleteenvelopecorrectview/

If you need any more help, you can open a Support Ticket, mentioning the Envelope Recipients and the Envelope IDs you're experiencing this error.

@LSPsyko
Copy link
Author

LSPsyko commented Jun 13, 2024

The recipient I'm setting is from the existing recipients of the envelope and no changes are applied.

Trying to delete the correctViews I got this error: "errorCode":"INVALID_REQUEST_BODY","message":"The request body is missing or improperly formatted."

@avinfinity avinfinity added the area-api all issues related to eSign api label Jun 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-api all issues related to eSign api
Projects
None yet
Development

No branches or pull requests

3 participants