Steps for authenticating and using Orchestrator cloud API

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

Hi. In advance, very thanks to post this article.
BTW, I tried to follow this step in order to get token. but I was stuck at last parts where call “authenticate” API. I have made header authorization bearer token using id_token and copied / pasted body part. but it came below errors.
{
“message”: “Invalid credentials, failed to login.”,
“errorCode”: 1000,
“resourceIds”: null
}

and what I did is below

Authonrization : Bearer Token : [id_token]
headers
Key : Content-Type
Value : application/json
Body :
{
“tenancyName” : “Documentation”,
“usernameOrEmailAddress” : “Documentation”,
“password” : “DocumentationAPItest”
}

I just copied it. cuz I log in Orchestrator using my Google Accounts that don’t know the password. also, I don’t know tenancy name as well. Should I change the parts that email address and password?

You need to provide the username , password and the tenant name in the body you are sending in the request @Chris_Kim

username and password are the one you are using to login to the orchestrator and tenant name is something which you will get in the right side pane when you click on services tab after logging into the orchestrator

1 Like

Thanks to answer @HareeshMR.
I still have some question about this. As I mentioned above I log into Orchestrator using Google Accounts. cuz I have never typed password ever. which means I don’t know my password. how can I solve this?

Also, when I logged into Orchestrator as admin account. it doesn’t show any tenant name where is pane at right side. if so, should I make a “tenancyName” empty?

@Chris_Kim

Just change the mail password and give the username and password to login to the orchestrator.

Forget about tenant ID, you will get the account logical name and service instance name in one of the steps above. You can use the ServiceInstanceName as tenant name

2 Likes

@HareeshMR
in advance thx to answer :smiley:

I have followed what you said above using postman
for example :

URL : https://platform.uipath.com/api/account/authenticate
Authorization :
Type : Bearer Token : wrote id_token I got it previous step when I called “https://platform.uipath.com/api/account/authenticate
header :
Content-Type : application/json
body :
{
“tenancyName” : “TestIdDefault”,
“usernameOrEmailAddress” : "testId@company.com",
“password” : “thisispassword”
}

but it comes out errors below when I called it
{
“message”: “Invalid credentials, failed to login.”,
“errorCode”: 1000,
“resourceIds”: null
}

what did I wrong?

I am trying to get access token via api/account/authenticate api but it thorws 400 bad request error.

I am trying to start a job by using access token that i got in consuming cloud api but here also i am getting same error 400 bad request error.

Please help me.

Using that access token , you need to get the another token (after step 6, there is another request to be sent to the server) @Akhilesh_Thakur. Can you check?

1 Like

yes, I did the same like https://docs.uipath.com/orchestrator/v2019/reference#consuming-cloud-api ( Generating Access Token and ID Token Using the Refresh Token)

Have you done this @Akhilesh_Thakur?

Here you will get the token which you need to use for starting the jobs or any other

1 Like

I am getting below error when I am trying to get access token

Pass the ID token from the refresh token request to this as the authorization token @Akhilesh_Thakur

1 Like

yes i am passing same id_token that i get from refresh token.

As per the screenshot above, you are not passing any authorization to the request @Akhilesh_Thakur

Can you check that again

1 Like