DocuSign JWT 请求 invalid_grant unsupported_grant_type

时间:2021-05-02 18:34:26

标签: jwt docusignapi

我正在开发环境中开发我的第一个 DocuSign Web 服务使用者。在这一点上,我只是想在 DocuSign 的操作方法页面上复制令牌请求过程:https://developers.docusign.com/platform/auth/jwt/jwt-get-token/ 我尽可能地坚持他们的 YouTube 视频中显示的过程。我创建了一个带有集成密钥和 RSA 密钥对(由 DocuSign 生成)的应用程序。我已按照操作说明的第 1 步获得申请同意。

按照操作方法页面的第 2 步,我在 jwt.io 中输入了以下请求:

标题:{"typ":"JWT","alg":"RS256"}

Payload: {"iss":"(integration key GUID)","sub":"(API username GUID)","iat":1619972504,"exp":1619975504,"aud":"account-d .docusign.com","scope":"signature"}

我将公钥和私钥(包括开始和结束字符串)粘贴到适当的字段中,然后 jwt.io 创建并验证了签名。

根据第 3 步和 YouTube 视频,在 Postman 中,我创建了一个 POST 请求到 https://account-d.docusign.com/oauth/token grant_type=urn:ietf:params:oauth:grant-type:jwt-bearer 断言=(从 jwt.io 复制的编码令牌)

无论我做什么,网络服务总是返回 { “错误”:“invalid_grant”, "error_description": "unsupported_grant_type" }

我花了更多的时间来承认重新阅读操作方法页面,重新观看其中的 YouTube 视频,并仔细检查我的数据以查找拼写错误等。

想法,有人吗?谢谢!

1 个答案:

答案 0 :(得分:0)

对于第 2 部分,您还需要 JWT 的“模拟”范围。