UiPath Orchestrator API : Authentication


#1

Hello,

I` m trying to authenticate to the Orchestrator API ussing the HTTP Request activity, with https://demo.uipath.com/api/account/authenticate as End Point, following the instructions indicated in …

https://www.uipath.com/hubfs/Documentation/OrchestratorAPIGuide_2016.2/UiPathOrchestratorAPIGuide_2016.2.html#Authentication

The returned status code 500 is always the service response.Any ideas on how to solve this issue? Is there any xaml example of this operation?

Thanks,


[Orchestrator HTTP Request] - Call odata - QueueDefinitions
Orchestrator API - how to trigger a process
Problem to start job In Orchestrator
#2

Hello Susana

You have to use Post Method with this api and to test it you can use postman api and pass the data with raw text option by replacing your demo.uipath.com credentials.

It is working for me:

and you have to use “http client” activity and it is working.

after that use “Json activities”: and use that as per your needs.

Regards…!!
Aksh


#3

Hello @aksh1yadav,

With the postman app It is working for me too :slight_smile:

But with HTTP Request Activity I get the status code 500, maybe the problem is that I’m not filling the credential data in the correct way in the request builder tab. Could you help me?

Thanks!


#4

@Teodor_Hoaghea


#5

Yes we can


Http request login
#6

Hello,

Many Thanks @aksh1yadav :grinning:, I do not see any difference with my previous settings but now it works!!!

Regards


#7

Hi,

Please don’t forget about the Content-Type application/json header.
This could be the problem. The request looks good.

Cheers,
Teo


#8

Thanks @Teodor_Hoaghea :relaxed:


#9

i had used similar steps but the HTTP request has error stating Password parameter already declared. I am able to see result in Preview Window but in UI Studio getting error


#10

Might be …not sure… you are passing it in header section as well and in parameter section as well… …just check it :slight_smile:

Regards…!!
Aksh


#11

Hi @aksh1yadav

do you have a HTTP Request Builder example using the authentication access token from the UiPath Orchestrator to get information from the Orchestrator? Everything I try results in an error that says I’m not signed in.

Many thanks

David


#12

Hey @david.spriggs

I have script and will share once will find it on my system :slight_smile: and allowed to share the standalone implementation. Let me know if you will not be able to achieve it still i will share :slight_smile:

i guess @Susana you can share that example script shared. i hope you remember :slight_smile:

Well after hitting the Authenticate api you will receive an authorization access token and that will be valid for 60 minutes.( previous 2016.2 api version info but guess will be same)
then you have to pass the token in header with following manner

Authorization: Bearer xxxxxxxxxxx

Authorization is a name attribute in Header Section
and Bearer xxxxxxxxxxxx is the value in header section

xxxxxxxxxxx - represents the access token.

then you will not get the above error.

Regards…!!
Aksh


#13

@david.spriggs, Find below the solution link shared by @Susana,

Require guidance in Orchestrator API

CC : @aksh1yadav

Regards,
Dominic :slight_smile:


#14

CC: :rofl: @Dominic

Regards…!!
Aksh


#15

@aksh1yadav, Ha bro just wantedly :wink:

Regard s,
Dominic :slight_smile:


#16

Many thanks


#17

Orchestrator Login mode is Windows.
I am use URL https://xxxx.xxxx.xxxx/api/account/authenticate to authenticate.

It does not works.

any idea would be helpful.


#18

Hi

when you say it doesn’t work do you get an error? If so could you share this here. Also which version of Orchestrator are you using?

Cheers

David


#19

I ma using version 2017. Error Code is 500 and says Login Model is null


#20

Have you tried the project example Require guidance in Orchestrator API uploaded in this thread? Maybe give it a go and post your results.

David