我正在使用 Asp.net MVC,我面临的问题是我必须通过电子邮件发送 pdf 才能获得客户签名。现在我已经使用 DocuSign 完成了此操作。但客户的要求是使用 Adobe Sign 发送文档。 现在,我需要在代码中生成访问令牌,但即使我的凭据正确,我得到的响应也是“401 Unauthorized”。 (如果我从 adobe sign 网站生成访问令牌并在我的代码中使用它,工作正常。但该令牌将在 1 小时后过期)
string clientId = "**********";
string clientSecret = "*************";
var tokenUrl = "https://secure.na3.adobesign.com/oauth/v2/token";
var tokenRequestBody = new Dictionary<string, string>
{
{"client_id", clientId},
{"client_secret", clientSecret},
{"grant_type", "client_credentials"},
{"scope", "user_read user_write user_login agreement_read agreement_write agreement_send library_write widget_write library_read widget_read"}
};
var tokenResponse = await client.PostAsync(tokenUrl, new FormUrlEncodedContent(tokenRequestBody));
if (tokenResponse.IsSuccessStatusCode)
{
由于响应“401 Unauthorized”,我无法进入此代码块。