What type of authorization does UiPath Cloud use?

589 views Asked by At

I am recently working with Uipath Orchestrator API and I see that they use Bearer token to authenticate. But I am confused and I do not know if this way of authentication is oAuth or it can just be called Bearer Authentication.

1

There are 1 answers

0
Conor On

So for API authentication, it depends on what orchestrator you are using.

On-Premise

If you are using an on-premise installation of Orchestrator you would send the following JSON body to your Yourorchestrator.com/api/Account/Authenticate

{
    "tenancyName":"default",
    "usernameOrEmailAddress":"your username",
    "password":"your password"
}

you will get a JSON string returned and you want to extract the value for key result this is your authentication token.

Now that you are authenticated you can send your requests with the following header

  • Name - Authorization
  • Value - Bearer + your token from above

This is your authentication done.

Cloud

If you are using UiPath cloud instance of orchestrator you will need to send the following JSON body

{
    "grant_type" : "refresh_token"
    "client_id" : "ClientId"
    "refresh_token" : "UserKey"
}

ClientId and UserKey are generated through the cloud instance of Orchestrator

You must also send the following header along with the JSON Body

  • Name - X-UIPATH-TenantName
  • Value - Your tenant logical name from orchestrator

Similar to the on-site orchestrator, this will return an authentication token, however, you will need to extract the value for key access_token.

To use this, you send the request with the following 2 headers

  • Name - Authorization

  • Value - Bearer + your token from above

  • Name - X-UIPATH-TenantName

  • Value - Your tenant logical name from orchestrator

There are some quite useful examples at https://postman.uipath.rocks/?version=latest

It can be quite fiddly to start with, and on-prem Orchestrator is definitely easier to connect with than Cloud orchestrator. I would definitely recommend using Postman to build your API calls