How to Authenticate to UiPath Cloud Orchestrator using API?

First note authenticating Cloud Orchestrator using Orchestrator API is different than On Premise Orchestrator. Follow the steps below to authenticate to Orchestrator Cloud using API:

  1. Login to your Cloud Platform account (https://platform.uipath.com).
  2. In the Services page, click the dots button next to a service and select the API Access option. The API Access window is displayed with the following service-specific information:
  • User Key - allows you to generate unique login keys to be used with APIs or with 3rd party applications in order to log in and perform actions on your behalf. This was previously known as your refresh token .
  • Account Logical Name - your unique site URL, (for example platform.uipath.com/ yoursiteURL ).
  • Tenant Logical Name - the selected service’s logical name. It may differ from the tenant’s name as it is displayed in the Services page. In this example, the tenant’s name is MirelaDefault , while the tenant logical name is MirelaDefaukvvd01326 .
  • Client Id - specific to the Orchestrator application itself, is the same for all users and tenants on a specific platform. For example, all the tenants on platform.uipath.com have the same Client Id value.
  1. Do not close this page. You need the information within it to make the authentication call.
    You can easily copy the values clicking the copy button next to each of these fields.

  1. Request to be sent at : https://account.uipath.com/oauth/token
    Header:
    Content-Type:application/json
    X-UIPATH-TenantName:tuhinssam

    Image_2019-12-03_10-56-39.png

Body:
{
“grant_type”: “refresh_token”,
“client_id”: “8DEv1AMNXczW3y4U15LL3jYf62jK93n5”,
“refresh_token”: “pluJgZzLuoRtE-h4AxHfd6mlI9gzKHEVbQiyZe-kbApQt”
}

Image_2019-12-03_10-55-50.png

You will get a response body as :
Image_2019-12-03_11-19-01.png

Note: access_token is valid for 24 hours. You have to regenerate the token once it is expired. You will get 401: Unauthorized error once the token exires.

Once the access token is generated, you can make API call to Cloud Orchestrator. Follow the documentation below for making the API call : https://docs.uipath.com/orchestrator/reference#section-making-orchestra

4 Likes

@Tuhin_Samanta I have been trying to get authentication token for my community orchestrator account. I followed all the steps you have mentioned. But everytime its throwing exceptions.
Please help me in getting this issue resolved.

@loginerror @ovidiuponoran Please let me know if you have any solutions.

Hi @Madhavi

Please pass your values as JSON via the Body tab in Postman, as per the first post of this topic.

2 Likes

@loginerror Worked. Thanks.
I am trying to add queue items through api call. But still blocked by issues. Can you please have a look.

5 posts were split to a new topic: Issue authenticating Orchestrator API - Invalid credentials, failed to login