REST API Error : Logon failure

Hello :slight_smile:

I’m a new user to UiPath and I’m trying to launch a UiPath Robot thanks to the REST API. I successfully started UiPath Robot REST API and I get “true” with the “isAlive” endpoint in PowerShell. I’m now trying to start a job but it don’t work, I have an error : “Logon failure: unknown username or bad password”.

I understand the error and I checked the credentials several times, but nothing works. I made the same instructions as a friend for whom it works.

$job =“{‘WorkflowFile’: ‘C:\…\Main.xaml’, ‘User’: ‘username’, ‘Password’: ‘password’, ‘Type’: 0}”
$jobIdResponse = Invoke-RestMethod -Uri http://127.0.0.1:8080/UiPath/service/agent/StartJob -Body $job -Method Post
$jobId = $jobIdResponse.ChildNodes[0].InnerText

I create credentials with a UiPath Robot.

Thanks in advance

1 Like