Steps for authenticating and using Orchestrator cloud API

@HareeshMR,
1.In step 6 which token we have to use “Id token” or “Access token” for authorization?
2.What is the tenancyName?
3. the username and the password are the login credentials which we use to login into platform.uipath.com?

Thanks
Vashisht.

We need to use ID TOKEN @Vashisht

We can get it in the services tab of the UiPath orchestrator page or the Account logical name we get from the request

Yes

1 Like

I tried this but getting stuck at postman step 4 while getting refresh token though I have replaced with Authorisation token and code .
Getting Invalid autorisation code. Not understanding

Authorization code also expires in a certain period of time @samrudh

Can you please try generating new authorization code again?

1 Like

Bro done with all the steps. It was very helpful. But last step to authenticate is not happeining getting bad request.

I m passing Autorisation Bearer token : token id . Is it correct?
Please help me with this last step.

Yes, you need to pass ID token. bad request in the sense, it seems you are missing the parameter to be sent to the server. can you check all the required? I mean the headers, body etc.,

and make sure that is a post request. Make sure the tenant name is also correct

Can you confirm, the ID token is generated in the last 30 minutes or before?

1 Like

Not sure about time. So if it exceeds more than 30 mins. From what step should I follow from ?

Not sure if it is only for 30 mins or 1 hour @samrudh. That’s not at all a problem now as per the error you posted, make sure all the inputs are correct

1 Like

I passed tenancy name:
username
password

and I have passed Authorization bearer token : [token id]

What else needs to be sent?

Can you try adding the header as

content -type : application/json

1 Like

added still not working Bad request

Can you check the credentials once ? This is purely related to the credentials and tenent name @samrudh

1 Like

Just wanted to confirm @HareeshMR . Is tenancyName same as “serviceInstanceName”: ?
and username is “accountName”: ? and password is the password of account?

To avoid confusion,

  1. Tenant name is accountLogicalName or when you open the orchestrator and click on services tab, you will see the tenant name on the right side pane
  2. username is the one you used to login to the orchestrator , may be it is a mail ID
  3. Password is also the same which you used to login to the orchestrator @samrudh
1 Like

Hi @HareeshMR, in step 4 I get this error, pls help

I hope the authorization code is expired. can you try sending the new authorization code in the body of the request @tranthao240495

1 Like

Now I tried with the tenancy name as name I got through request AccountLogical Name
still not getting response

Are you sure the username and password are correct, they are the one which you used while logging into the orchestrator. I hope the username will be the one you used to register into the orchestrator site. And kindly check the tenant name once logging into the orchestrator

1 Like

It’s only in a minute, not long. I tried a few times and keep receiving that error

Have you changed the client ID? @tranthao240495

1 Like