Hi,
How to get an access token with JWT grant authentication?
Hi Siva,
in your short question :-) it is a little bit unclear, what you want to achieve. I think you mean how to create a Json Web Token to exchange it for an access token to get data from an external api ?
This involves the following steps (depends mostly on the settings of your resource provider)
* Register your application with the provider. You will receive some codes you will need. This will most like also mean that you have to set a public/private key pair for signing or encryption of the JSON Web Token.
* In some cases (also depends on the provider configuration) you will have to perform a one-time consent. The vendor should provide you with URL details on how to do that.
* Create the JSON web token. Besides the mandatory claims you have to add there may also be additional claims and scopes you have to add. The provider must give you the necessary details what to include in the web token.
To create the web token you can use this awsome forge component JWT - Overview | OutSystems
* The token either needs to be signed or encrypted, depending on the requirement of provider.
* You send the signed/encrypted to the token exchange endpoint. Most likely that is something like /oauth/token.
If the provider accepts your token you will receive an access token along with an expiry TTL.
Hope that helps,
Stefan
Actually i need to generate an access token using jwt token for using docusign api.
Then the described process above is what you need to do. Actually i do the same accessing the DocuSign Api. See here for further details: Access Tokens with JSON Web Token (JWT) Grant | DocuSign | DocuSign
Do you have any api for generating the jwt in outsystems?
In the Docusign documentation it is done using the jwt.io website but how to convert the json to a encoded signature in outsystems?
Please read my post above. I already included a link to an JWT forge component.