Rex
Rex

Reputation: 157

Error calling CreateRecepientView: Unknown_envelope_Recipient

Would like to generate a DocuSign Url to embed to a web application. Got below print screen. Questions 1 Where to get the "SignerCliendId"(the 3rd parameter of MakeRecipientViewRequest)? 2 How to handle "Unknown_envelope_Recipient"?

BugPrintScreen

Thanks

Upvotes: 0

Views: 135

Answers (2)

Rex
Rex

Reputation: 157

I set the clientUserId = '1000', in MakeEnvelope() using the below code.

Signer1.ClientUserId = "1000"

and used RecipientViewRequest

viewRequest = MakeRecipientViewRequest(signerEmail, signerName, "1000");

Then, it works!

Upvotes: 1

Inbar Gazit
Inbar Gazit

Reputation: 14050

I cannot see your MakeRecipientViewRequest() method, but look below I provide the C# code that does what you need. The issue here is that you must match the recipient (singer) information for which you are generating a signer view. The system wasn't able to find such a recipient and that's why you got the error. (I also noticed you use a template, so may need to check how that was done too)

        RecipientViewRequest viewRequest = MakeRecipientViewRequest(signerEmail, signerName);

private RecipientViewRequest MakeRecipientViewRequest(string signerEmail, string signerName)
{
    // Data for this method
    // signerEmail 
    // signerName
    // dsPingUrl -- class global
    // signerClientId -- class global
    // dsReturnUrl -- class global


    RecipientViewRequest viewRequest = new RecipientViewRequest();
    // Set the url where you want the recipient to go once they are done signing
    // should typically be a callback route somewhere in your app.
    // The query parameter is included as an example of how
    // to save/recover state information during the redirect to
    // the DocuSign signing ceremony. It's usually better to use
    // the session mechanism of your web framework. Query parameters
    // can be changed/spoofed very easily.
    viewRequest.ReturnUrl = dsReturnUrl + "?state=123";

    // How has your app authenticated the user? In addition to your app's
    // authentication, you can include authenticate steps from DocuSign.
    // Eg, SMS authentication
    viewRequest.AuthenticationMethod = "none";

    // Recipient information must match embedded recipient info
    // we used to create the envelope.
    viewRequest.Email = signerEmail;
    viewRequest.UserName = signerName;
    viewRequest.ClientUserId = signerClientId;

    // DocuSign recommends that you redirect to DocuSign for the
    // Signing Ceremony. There are multiple ways to save state.
    // To maintain your application's session, use the pingUrl
    // parameter. It causes the DocuSign Signing Ceremony web page
    // (not the DocuSign server) to send pings via AJAX to your
    // app,
    viewRequest.PingFrequency = "600"; // seconds
                                       // NOTE: The pings will only be sent if the pingUrl is an https address
    viewRequest.PingUrl = dsPingUrl; // optional setting

    return viewRequest;
}

Upvotes: 0

Related Questions