Generate JWT Token

Can you help me to create JWT token using UiPath.
I have all details clientID, client secret, private key, public key, etc.,

Check this example:

More details can be found here: Accessing UiPath resources using external applications

Also check this post: Orchestrator API Usage - External Application - #7 by marian.platonov

Thanks for your reply, my requirement is to generate JWT token Using UiPath tool for Adobe user management api

First, perform an example in Postman and then adapt it in UiPath Studio.

how to perform an example in postman to create JWT token ? JWT token creation is not possible to create using postman.

If you cannot create a JWT access_token in Postman (an external application), you will have also issues in UiPath Studio (that is also an external application).

Look into the Adobe Rest API/SOAP documentation and try to implement the request in Postman. Then it will be easier for you to implement the same in UiPath Studio.

Check this documentation:

If you want to implement Adobe API using postman or UiPath, required access token. we can generate access token using postman or UiPath (HTTP request). If you want to generate access token, you need to have JWT token. I want steps to create JWT token using UiPath tool, i have all required values to create JWT token, but i don’t no which activities to use to create JWT token using UiPath (JWT token creation happens using RS256 algorithm)

In your project add UiPath.WebAPI.Activities package. Then you will use the HTTP Request activity with Deserialize JSON activity.

I know these activities, these activities are used for HTTP request. These activities will be useful once you have JWT token is ready.

My requirement is to create JWT token.

Do you have a Python script or in other languages that are creating the needed jwt tokens? If yes, then use that language and invoke that script in UiPath and store the jwt token in a text file. After that, you can read that file content and extract the needed jwt token and use it afterward.

I have python script to generate JWT token, but that is not recommended solution. I believe UiPath tool should have something to generate JWT tokens.

What makes it not a recommended solution? JWT is simply a defined schema of data of which would be defined by Adobe (in this case) and then generally signing that packet of data with your private key which is also registered to your Account.

Adobe provides sample projects on how to approach this with Java and Python, mimicking the flow in another language such as .NET or C#, both of which UiPath supports among other languages and likely libraries already exist for you to use.

You could also create your own custom library activities if you desired.

Quick glance over Adobe’s documentation, you have more than enough to get started and from here it’s just a matter of how you want your implementation to look and what technology you want to use.

If UiPath does’t have an official package that support generating JWT tokens, you could always checkout the Marketplace to see if any other provider or user has created what you are looking for and/or other external libraries that you could import for use within your project for example but not limited to NuGet Gallery | Microsoft.IdentityModel.Tokens 7.0.3 and NuGet Gallery | System.IdentityModel.Tokens.Jwt 7.0.3.

Short of that would be Submitting Feedback within Studio for such an officially supported Activity/Pacakage and alternatively through the appropriate topic section in Feedback - UiPath Community Forum

1 Like