【问题标题】:I'm trying to access the docusign API and I'm getting an error in authentication how to solve this?我正在尝试访问docusign API,但在身份验证中遇到错误如何解决?
【发布时间】:2021-06-16 20:06:09
【问题描述】:

当我尝试访问 api 时,我收到以下错误消息:

{ "errorCode": "PARTNER_AUTHENTICATION_FAILED", "message": "指定的集成商密钥未找到或被禁用。未指定集成商密钥。" }

我正在使用从该 URL 返回的访问令牌:https://account-d.docusign.com/oauth/token,但文档要求请求签名信封列表的 url 地址是:https://demo.docusign.net/restapi/v2.1/accounts/bf672cac-****-****-****-757e9b8ebfb3/envelopes

如果我将端点域的开头更改为https://account-d.docusign.com/,我会得到状态 200 和一个 HTML,它并没有说明错误,它遵循 html:

<!doctype html>
<html ng-app="LoginAppNext.App" lang="en" class="account-server">

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="initial-scale=1.0">
    <meta name="description" meta-description>
    <title>DocuSign</title>
    <link href="https://docucdn-a.akamaihd.net/olive/images/2.15.0/favicons/favicon.ico" rel="shortcut icon"
        type="image/x-icon">
    <base href="/">
    <link rel="canonical" href="https://account-d.docusign.com/" />




    <link href="/LoginAppNext/styles/olive/and/app?v=7_dKAUfFq_HQdBnGB4k7hYZKoOae-bgnT30ORlEXHEk1" rel="stylesheet" />

    <!-- 21.1.2.19210 DA2DFE5 ac4fea07-f999-49e8-b450-a9bd5aa45430 -->
    <!-- PAGE-TITLE DIRECTIVE MUST BE LAST INSIDE THE HEAD TAG -->
    <page-title></page-title>
</head>

<body class="site-content">

    <form name="fixtureForm">
        <input id="fixtureInput" value="illegible value that is returned in the request">
    </form>
<div ui-view></div>

        <!--[if (!IE)|(gt IE 8)]><!-->
        <script src="/LoginAppNext/core_via_npm?v=HmqVrseATw9A8eLx4-PxjAKYi3QSWgFzyC0R2L_sc9Q1"></script>


        <!--<![endif]-->
        <!--[if lte IE 8]>
      <link href="/LoginAppNext/styles/legacy?v=4PA642FFntoeJCbU9Xo8MtjFl47UpOhb1wGcStBQ1UU1" rel="stylesheet"/>

      <script src="/LoginAppNext/core_via_npm/legacy?v=k4d0Yt_N4blS8S0QrMQ8yybLJtbXex6uQ8SkokHHi_41"></script>


        <style type="text/css">
            /*
                Older browsers (IE8) may interpret the new tags as having an empty XML namespace
                when Angular attempts to generate them, so we need to deal with the default styling of those elements, too.
            */

            \:article,
            \:aside,
            \:details,
            \:figcaption,
            \:figure,
            \:footer,
            \:header,
            \:hgroup,
            \:main,
            \:nav,
            \:section,
            \:summary {
              display: block; }
        </style>
    <![endif]-->
        <script src="/LoginAppNext/templates?v=daF9DMXq4GIP_dsEt7fCPBYMN-A6Xk9bMZC4suEj0r01"></script>

        <script src="/Scripts/app?v=lfm-G_adZ-QhT3MeHhQWFFV_fQ6ENsg6BV4q01boB6M1"></script>


</body>

</html>

【问题讨论】:

  • 你确定header有一个“授权”的key,并且value在token前有一个Bearer前缀吗?
  • 这个我不能说,但是你能告诉我怎么检查吗?
  • 你打的怎么样?通过代码或邮递员之类的工具?
  • 先由邮递员,然后我将使用代码获取令牌

标签: java jwt docusignapi bearer-token


【解决方案1】:

您可能没有在请求中传递 Authorization 标头。在您的邮递员请求中,请将其添加到您输入资源 uri 下方的“标题”选项卡中,格式为 Key:Authorization Value: Bearer {AccessToken}

请查看我们的邮递员集合,您可以轻松导入以了解其工作原理:https://github.com/docusign/postman-collections

【讨论】:

  • 这个资源我第一次尝试使用,但是我怀疑它生成错误,因为它生成一个错误说:Unresolved Variable This variable is not defined in the active collection, environment or全局变量。 现在我不知道如何继续
  • 您需要填写环境或集合范围内的每个变量。你可以了解更多关于变量here
猜你喜欢
  • 2022-06-16
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2020-06-17
  • 2018-01-29
  • 1970-01-01
  • 2013-02-27
相关资源
最近更新 更多