简体   繁体   English

无法为docusign中的模板ID创建的信封创建发件人视图

[英]Can not create a sender view for the envelope created by template Id in docusign

I am trying to create an embedded view of an Envelope that I created using a TempplateId of a template created at my docusign account but the envelopesApi.CreateEnvelope doesn't work. 我正在尝试创建一个信封的嵌入式视图,该视图是使用在docusign帐户中创建的模板的TempplateId创建的,但是envelopesApi.CreateEnvelope不起作用。

Here's my method that creates the envelope for a User taking in the template Id 这是我的方法,用于为使用模板ID的用户创建信封

private string MakeEnvelope(string signerEmail, string signerName, string templateId)
        {

            EnvelopesApi envelopesApi = new EnvelopesApi();

            // Data for this method
            // signerEmail 
            // signerName
            // ccEmail
            // ccName
            // templateId

            EnvelopeDefinition env = new EnvelopeDefinition
            {
                TemplateId = templateId,
                Status = "created"
            };

            TemplateRole signer1 = new TemplateRole();
            signer1.Email = signerEmail;
            signer1.Name = signerName;
            signer1.RoleName = "Customer";

            //Company tab for signer
            Company companyTab = new Company
            {
                Value = "Systems Limited",
                TabLabel = "0b640933-9224-48e7-b8bc-adf388b63ac5"
            };

            Company[] companyTabs = new Company[] { companyTab };

            signer1.Tabs = new Tabs { CompanyTabs = new List<Company>(companyTabs) };
            //Company tab for signer

            env.TemplateRoles = new List<TemplateRole> { signer1 };

            var options = new ReturnUrlRequest();
            options.ReturnUrl = returnUrl;




            EnvelopeSummary envelopeSummary = envelopesApi.CreateEnvelope(accountId, env);

            ViewUrl recipientView = envelopesApi.CreateSenderView(accountId, envelopeSummary.EnvelopeId, options);


            return recipientView.Url.ToString();
        }

it gives this error: 它给出了这个错误:

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

can someone please help me with this? 有人可以帮我吗?

An integration Key (API error message uses the old term "integrator key") must be used in the same environment. 必须在同一环境中使用集成密钥(API错误消息使用旧术语“集成器密钥”)。 Did you create a Developer Sandbox integration Key? 您是否创建了开发人员沙盒集成密钥? have you used it to obtain a token using OAuth consent flow? 您是否使用它通过OAuth同意流程获取令牌? Typically this error happens when you use the wrong key or point to the wrong environment 通常,当您使用错误的密钥或指向错误的环境时,会发生此错误

It looks like you're not configuring your EnvelopesApi client, so there's no authentication info in the API call that's firing. 似乎您没有配置EnvelopesApi客户端,因此触发的API调用中没有身份验证信息。

If you've already done authentication on an ApiClient, you can pass that configuration into the EnvelopesApi client like this: 如果您已经在ApiClient上进行了身份验证,则可以将该配置传递给EnvelopesApi客户端,如下所示:

EnvelopesApi envelopesApi = new EnvelopesApi(apiClient.Configuration);

If you don't have authentication set up at all, I'd recommend referencing the auth code grant launcher: https://github.com/docusign/eg-03-csharp-auth-code-grant-core 如果您根本没有设置身份验证,建议您参考身份验证代码授予启动器: https : //github.com/docusign/eg-03-csharp-auth-code-grant-core

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 从模板json文件创建Docusign信封 - Create Docusign envelope from template json file Docusign:有没有办法在“已创建”状态下创建信封,然后在以后将其放入“发送”? - Docusign: Is there a way to create an envelope in the 'created' state and then put it into 'sent' later? 更改EnvelopesAPI中DocuSign信封上的发件人 - Change sender on DocuSign envelope within EnvelopesAPI DocuSign:是否有使用权限来避免 USER_NOT_ENVELOPE_SENDER_OR_RECIPIENT 错误? - DocuSign: Is there a permission to use to avoid USER_NOT_ENVELOPE_SENDER_OR_RECIPIENT error? 在基于模板的docusign信封上添加签名者 - Add signer on template based docusign envelope 尝试使用多个文档创建DocuSign信封 - Trying to create DocuSign envelope with multiple documents C# DocuSign API:将用户重定向到现有信封的收件人视图 - C# DocuSign API: Redirect user to recipient view for existing envelope 如何使用rest api在DocuSign中创建信封的副本? - How to Create a Copy of an Envelope in DocuSign using rest api? DocuSign API:我可以获得格式良好的信封审核结果吗? - DocuSign API: Can I get a nicely formatted Envelope Audit Results? 当我尝试创建信封C#和Json时,出现Docusign错误:“ ENVELOPE_IS_INCOMPLETE” - Docusign error: “ENVELOPE_IS_INCOMPLETE” when I'm trying to create an envelope C# and Json
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM