首页 > 解决方案 > DocuSign 公证人 API 错误 - NOTARY_NOT_ALLOWED

问题描述

我正在通过 API 审查 Docusign Notary 功能。但我被困在一点上。

API 返回异常 "{"errorCode":"NOTARY_NOT_ALLOWED","message":"Notary not enabled."}"

.我正在使用开发者帐户来测试上述功能(demo.docusign.net)。是否有任何其他设置可以启用 Docusign Notary?

 private static EnvelopeDefinition MakeEnvelope(string signerEmail, string signerName, string signerClientId, string docPdf, string accountId)
    {
       
        byte[] buffer = System.IO.File.ReadAllBytes(docPdf);
        EnvelopeDefinition envelopeDefinition = new EnvelopeDefinition();
        envelopeDefinition.EmailSubject = "Please sign this document";
        Document doc1 = new Document();
        String doc1b64 = Convert.ToBase64String(buffer);
        doc1.DocumentBase64 = doc1b64;
        doc1.Name = "Lorem Ipsum"; 
        doc1.FileExtension = "docx";
        doc1.DocumentId = "3";
        envelopeDefinition.Documents = new List<Document> { doc1 };
        Signer signer1 = new Signer
        {
            Email = signerEmail,
            Name = signerName,
            ClientUserId = signerClientId,
            RecipientId = "2",
            NotaryId = "1",
            RoutingOrder = "1"
        };
        NotaryRecipient notaryRecipient = new NotaryRecipient
        {
            Email = "xxx@xxx.com",
            Name = "xxx",
            RecipientId = "1",
            RoutingOrder = "1",
            Tabs = new Tabs
            {
                NotarySealTabs = new List<NotarySeal>() { new NotarySeal { XPosition = "50", YPosition = "150", DocumentId = "3", PageNumber = "1" } },
                SignHereTabs = new List<SignHere>() { new SignHere { XPosition = "300", YPosition = "150", DocumentId = "3", PageNumber = "1" } }
            },
            UserId = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx",//accountId,
            NotaryType = "remote"
        };
      
        Tabs signer1Tabs = new Tabs
        {
            SignHereTabs = new List<SignHere>() { new SignHere { XPosition = "150", YPosition = "150", DocumentId = "3", PageNumber = "1" } }
        };
        signer1.Tabs = signer1Tabs;
        Recipients recipients = new Recipients
        {
            Signers = new List<Signer> { signer1 },
            Notaries = new List<NotaryRecipient> { notaryRecipient }

        };
        envelopeDefinition.Recipients = recipients;
        envelopeDefinition.Status = "sent";
        return envelopeDefinition;
    }

我错过了什么吗?

而且我也在对应的账号里加了Notary Public 在此处输入图像描述

标签: docusignapi

解决方案


代码有点不对劲。您需要这样做(请参阅有关该主题的博客文章):

var notaryHost = new NotaryHost
{
    Name = "Nadia Notary",
    Email = "nadianotary@domain.com",
    DeliveryMethod = "email",
    RecipientId = "2",
    Tabs = new Tabs { NotarizeTabs = notarizeTabs }
};
// InPersonSigner is used here even if the signer doesn't sign in person
var inPersonSigner = new InPersonSigner
{
    NotaryHost = notaryHost,
    Name = "Eddie End User", 
    Email = "endusersigner@domain.com", 
    RecipientId = "1",
    InPersonSigningType = "notary",
    Tabs = new Tabs { SignHereTabs = signHereTabs }
};
var inPersonSigners = new List<InPersonSigner>();
inPersonSigners.Add(inPersonSigner);
var recipients = new Recipients{ InPersonSigners = inPersonSigners };

附言

您可能正在尝试使用 beta 远程在线公证功能,而不是作为 eSign 一部分的更成熟的 eNotary。如果这是您的意图,您可能无法执行此操作,因为它是封闭测试版,尚未对所有人开放。


推荐阅读