Error: Connect listener cannot reside on internal DocuSign site

Error: Connect listener cannot reside on internal DocuSign site

目前我可以从带有 EventNotifications 的信封的模板发送,如下所示:

            var envelopeDefinition = new EnvelopeDefinition();
            envelopeDefinition.Status = "sent";
            envelopeDefinition.TemplateId = templateId;
            envelopeDefinition.TemplateRoles = templateRoles;
            envelopeDefinition.EventNotification = new EventNotification
            {
                RequireAcknowledgment = "true",
                IncludeTimeZone = "true",
                Url = "https://localhost:44357/Agreements/UpdateStatus",
                RecipientEvents = new List<RecipientEvent>
                {
                    new RecipientEvent(RecipientEventStatusCode: "Sent"),
                    new RecipientEvent(RecipientEventStatusCode: "Delivered"),
                    new RecipientEvent(RecipientEventStatusCode: "Completed"),
                    new RecipientEvent(RecipientEventStatusCode: "Declined"),
                    new RecipientEvent(RecipientEventStatusCode: "AuthenticationFailed"),
                    new RecipientEvent(RecipientEventStatusCode: "AutoResponded")
                },
                EnvelopeEvents = new List<EnvelopeEvent>
                {
                    new EnvelopeEvent("Voided")
                }
            };

然而,当我尝试对批量发送执行类似操作时,我在标题中收到错误消息:

            var signer1 = new TemplateRole();
            signer1.Email = "multiBulkRecipients-signer@docusign.com";
            signer1.Name = "Multi Bulk Recipient::signer";
            signer1.RoleName = "signer";
            signer1.Tabs = new Tabs
            {
                TextTabs = new List<Text>
                        {
                            new Text
                            {
                                TabLabel = "RetailerName",
                                Value = "Please Sign Here"  
                            }
                        }
            };

            var env = new EnvelopeDefinition();
            env.TemplateId = templateId;
            env.TemplateRoles = new List<TemplateRole> { signer1 };
            env.Status = "sent";
            env.EventNotification = new EventNotification
            {
                RequireAcknowledgment = "true",
                IncludeTimeZone = "true",
                Url = "https://localhost:44357/Agreements/UpdateStatus",
                RecipientEvents = new List<RecipientEvent>
                {
                    new RecipientEvent(RecipientEventStatusCode: "Sent"),
                    new RecipientEvent(RecipientEventStatusCode: "Delivered"),
                    new RecipientEvent(RecipientEventStatusCode: "Completed"),
                    new RecipientEvent(RecipientEventStatusCode: "Declined"),
                    new RecipientEvent(RecipientEventStatusCode: "AuthenticationFailed"),
                    new RecipientEvent(RecipientEventStatusCode: "AutoResponded")
                },
                EnvelopeEvents = new List<EnvelopeEvent>
                {
                    new EnvelopeEvent("Voided")
                }
            };
            var result = await envelopesApi.CreateEnvelopeAsync(_docuSignSettings.AccountId, env);

从模板批量发送的方法:

var bulkEnvelopesApi = new BulkEnvelopesApi(config);

var sendingList = MakeBulkSendList(retailersInfo);
var createBulkListResult = await bulkEnvelopesApi.CreateBulkSendListAsync(_docuSignSettings.AccountId, sendingList);

var envelopeId = await MakeBulkEnvelope(config, vm.TemplateId, createBulkListResult.ListId);

var bulkRequestResult = await bulkEnvelopesApi.CreateBulkSendRequestAsync(_docuSignSettings.AccountId, createBulkListResult.ListId, new BulkSendRequest { EnvelopeOrTemplateId = envelopeId });

var bulkStatus = await bulkEnvelopesApi.GetBulkSendBatchStatusAsync(_docuSignSettings.AccountId, bulkRequestResult.BatchId);

顺便说一句,如果我不包含 EventNotifications,我可以批量发送。

GetBulkSendBatchStatusAsync 的错误图片:
https://i.stack.imgur.com/dnL6x.png

批量发送是否需要不同的 URL(连接 webhook)?

感谢阅读!

这个错误有点误导。 在这种情况下,“Internal DocuSign”也意味着本地主机。 https://localhost:44357/Agreements/UpdateStatus 对于 Connect webhooks 不是有效的 URL。

您可能想考虑使用云提供商作为一个简单的选择。

如果您只是想做一些测试,您可以使用 webhook.site 或类似的工具。

您不能将 localhost 用作 Webhook 目标 URL,因为 URL 是由 SAAS 服务 (DocuSign) 查找的。对于 DocuSign,localhost 意味着它自己的服务器。

您的 webhook 侦听器(您的服务器)需要在 public 互联网上可用。看看这个 blog post.