Cloud API authentication and consumption

How to authenticate the request and call apis for UiPath cloud platform.

UiPath Cloud Platform has a new mechanism for consuming APIs. Hence, all clients that used to connect to Orchestrator CE via API need to be updated in order to connect to the UiPath Cloud Platform.

Below are the main steps that we perform to authenticate the request in UiPath cloud platform:

  1. Generate code challenge and code verifier
  2. Get Authorization code
  3. Getting account logical name
  4. Getting service logical name
  5. By using authorization code, account logical name and service logical name, we can call any other orchestrator api calls(like Get/Post/PUT).

Note: The [access_token] required for making API calls is valid for 24 hours. It needs to be regenerate [access_token] and [id_token] using the[refresh_token], otherwise a 401 status code is received.

This workflow can be taken as reference, that takes care of all the steps required to authentication and making further API calls. This workflow can be very useful in order to avoid manually creating code challenge, code verifier, access token, id token etc.