On-premise Orchestrator API Authentication Error ("You are not authorized to perform this action!")

Hi,

I’m trying to run a process with a API call. Here’s what i do:

1) Obtain the api token with tenancyname, username and password from the following endpoint:

https://{somecompany}.com/api/account/authenticate"

This returns an api token with 475 character length.

2) Send a request with the following headers and parameters to the following endpoint:

endpoint:
https://{somecompany}.com/odata/Jobs/UiPath.Server.Configuration.OData.StartJobs

headers

    headers = {
        'Authorization': 'Bearer ' + api_token, <-- (api token i just retrieved)
        'Content-Type': 'application/json',
        'X-UIPATH-TenantName': '{tenancyname}', <-- (correct tenancy name)
        'X-UIPATH-OrganizationUnitId': '3' <-- (correct folder id)
    }

payload

payload = {
    "startInfo":
           {
               'ReleaseKey': {{some release key}},
               'RobotIds':[1],
               'JobsCount':0,
               'Strategy':'Specific',
               'Source': 'Manual'
           }
}

However i keep running in to “‘You are not authorized to perform this action!’”. What am i doing wrong here?

Ooops, i was entering the wrong tenancy name when obtaining the api token. Ignore the question please. :cold_face:

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.