TL:DR - 有没有办法通过我的应用程序和 DocuSign 之间的重定向来创建信封,而不是使用 REST API?
我想通过以下方式在我的应用程序和 DocuSign 之间创建集成:
可以吗?
我尝试查看 DocuSign 文档,但没有找到任何关于我描述的工作流程存在的确认,即使我看到一些应用程序在做完全相同的事情。
是的,您可以做到这一点,并且这个确切的场景不仅有记录,而且我们还用八种语言展示了如何做到这一点。
请注意,您确实需要使用电子签名 REST API 来执行此操作,我不知道在不使用 API 的情况下执行此操作的方法。也许 Microsoft PowerApps(或逻辑应用程序)之类的东西具有此功能,但您仍将在幕后使用 REST API。
我强烈建议您尝试使用您选择的代码下载快速入门,然后选择“嵌入式发送”代码示例以向您展示其工作原理。
这里是一些 C# 代码(因为你没有说出什么编码语言):
public static string SendEnvelopeUsingEmbeddedSending(string signerEmail, string signerName, string ccEmail, string ccName, string docDocx, string docPdf, string accessToken, string basePath, string accountId, string startingView, string returnUrl)
{
var docuSignClient = new DocuSignClient(basePath);
docuSignClient.Configuration.DefaultHeader.Add("Authorization", "Bearer " + accessToken);
EnvelopesApi envelopesApi = new EnvelopesApi(docuSignClient);
// Step 1. Make the envelope with "created" (draft) status
EnvelopeDefinition env = MakeEnvelope(signerEmail, signerName, ccEmail, ccName, docDocx, docPdf, "created");
EnvelopeSummary results = envelopesApi.CreateEnvelope(accountId, env);
string envelopeId = results.EnvelopeId;
// Step 2. create the sender view
// Call the CreateSenderView API
// Exceptions will be caught by the calling function
ReturnUrlRequest viewRequest = new ReturnUrlRequest
{
ReturnUrl = returnUrl,
};
ViewUrl result1 = envelopesApi.CreateSenderView(accountId, envelopeId, viewRequest);
// Switch to Recipient and Documents view if requested by the user
string redirectUrl = result1.Url;
Console.WriteLine("startingView: " + startingView);
if ("recipient".Equals(startingView))
{
redirectUrl = redirectUrl.Replace("send=1", "send=0");
}
return redirectUrl;
}