简体   繁体   中英

Docusign REST API: Implementing OAuth Authentication using JWT Grant from Microsoft Flow

I am getting below error when making HTTP call for JWT Token,

The Authorization Call succeeded well as shown in below screenshot, but when making HTTP Call for JWT Acess Token (screenshot 2), then below error

{"error":"invalid_grant","error_description":"unsupported_grant_type"}

I am new to using/**developing Docusign for first time, what am I doing wrong? (like if i need to put/correct URL,Headers,Body,..... ) or what can be the cause of the error. I am following this URL from Docusign OAuth

  1. Request application consent
  2. Create a JWT
  3. Obtain the access token -->getting Error @ implementing this step
  4. Get your user's base URI
  5. Use the access token to make an API call

https://account-d.docusign.com/oauth/auth?response_type=code&scope=signature%20impersonation&client_id=@{variables('IntegratorKey')}&redirect_uri=https://localhost

在此处输入图像描述

https://account-d.docusign.com/oauth/token

Create Envelope

https://demo.docusign.net/restapi/v2.1/accounts/@{variables('Docusign AccountID')}/envelope

https://account-d.docusign.com/oauth/auth?response_type=code&scope=signature%20impersonation&client_id=@{variables('IntegratorKey')}&redirect_uri=https://localhost

From the OAuth documentation :

Redirect the user's browser to your constructed URI, where they will grant consent and obtain an authorization code. Note that this is not a standard GET request and cannot be directly sent by the application. Instead, the user's browser is redirected to an authorization request URI and the request is sent from there to the account server.

EDIT : now, with screenshots, I can see what you are supposed to do.

It might happen that your login/auth dialog handling scheme is not working properly and you have, in reality, no data in JWT token. There is no real way to confirm or reject this from here.

Apart from that, the error you receive is indicative of _you having an improperly formatted assertion.

Please include how do you assemble, sign and encode the assertion . It should use RSA-SHA256 encryption/signature pair. Then you have to concatenate the parts with a dot.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM