获取信封URL [英] Get envelope URL

查看:82
本文介绍了获取信封URL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有一种使用API​​的方法来获取URL,以便用户查看DocuSign网站上的特定信封?我不是要使用嵌入式签名体验,因此API提供的各种信封视图"不是所需的URL.目的是在自定义Web应用程序中提供一个链接,当单击该链接时,将基于用户登录Docusign网站显示信封,并在必要时重定向到Docusign登录页面(控制台" URL提供了所需的UI,但不会强制这种普通的网站身份验证.)

Is there a way to use the API to get the URL for a user to view a particular envelope on the DocuSign web site? I'm not trying to use the embedded signing experience, so the various envelope "views" provided by the API are not the desired URLs. The goal is provide a link in a custom web application that when clicked would show the envelope based on the user's sign-in to the Docusign web site, redirecting to the Docusign login page if necessary (the "console" URL provides the desired UI but does not force this kind of normal website authentication).

我看过其他几篇文章,包括获取文档网址.后者看上去很有希望(尽管在我看来,所需的URL是用于整个信封,而不是特定的文档),但没有提供用于构建完整URL的代码示例.

I've seen a couple other posts, including url for managing an evelope and get document url. The latter one looked promising (though in my case the desired URL is for the overall envelope, not a specific document), but doesn't provide a code example for constructing the complete URL.

我正在使用C#,其代码包括以下内容(基于

I'm using C#, with code that includes the following (based on the get envelope API):

EnvelopesApi envelopesApi = new EnvelopesApi(loginResult.ApiConfiguration);
var envelope = envelopesApi.GetEnvelope(loginResult.AccountId, envelopeId);

string envelopeUri = envelope.EnvelopeUri;

Uri baseUri;
if (Uri.TryCreate(baseUrl, UriKind.Absolute, out baseUri))
{
    var uriBuilder = new UriBuilder(baseUri.Scheme, baseUri.Host);
    uriBuilder.Path = envelopeUri;

    envelopeUrl = uriBuilder.Uri.AbsoluteUri;
}

"baseURL"来自登录结果.产生的"envelopeUrl"的示例是 https://demo.docusign.net/envelopes/c47dfe7b-3b2c-4885-95b8-56ac7c5aba18

The "baseURL" is from the login result. An example of the resulting "envelopeUrl" is https://demo.docusign.net/envelopes/c47dfe7b-3b2c-4885-95b8-56ac7c5aba18

但是,该URL返回404错误.URL的路径部分是否还需要其他内容?该文档尚不清楚如何使用返回的envelopeUri,还是用于API还是用于浏览器的普通网站URL的一部分.

However, that URL returns a 404 error. Is there more needed in the path portion of the URL? The documentation isn't clear how to use the returned envelopeUri, or whether it is for API use or part of a normal website URL for use in a browser.

推荐答案

您提到控制台URL为您提供了所需的UI,因此,如果您希望控制台URL具有正常的网站身份验证,则可以使用授权代码授予

You mentioned that console URL provides you the desired UI so if you want console URL with normal website authentication then you can use Authorization Code Grant, https://docs.docusign.com/esign/guide/authentication/oa2_auth_code.html#starting-the-authentication-code-grant

要求用户通过DS WebApp进行身份验证,身份验证之后,您需要使用OAUTH API生成其访问令牌,一旦获得访问令牌,然后使用控制台视图向用户显示DS WebApp.

Ask user to authenticate via DS WebApp and after authentication, you need to generate their access token using OAUTH APIs, once you get access token then use Console View to show DS WebApp to the user.

这篇关于获取信封URL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆