All Cloud based REST APIs for Orchestrator are not working in web app on localhost

Hello,
I am working on a web application which interacts with orchestrator to trigger automation.
I have registered the web app as an external application in cloud.uipath.com and was trying integrate orchestrator using REST APIs.
However, none of the API starting from Authentication are working within code. They are working only in POSTMAN.
I am continuously getting CORs no matter how many solution i tried reading from all the threads in the forum.
I have used ‘Access-Control-Allow-Origin’:’*’, in the headers, enabled cors in Fetch method while making api calls.

Authentication API using client_credentials was throwing ‘invalid_client’ error all the time, even though i gave the right APP ID from the cloud.uipath.com.
Documentations have no clear explanation.

I tried authenticating with deprecated OAuth call https://account.uipath.com/oauth/token . After couple of tries this worked.
But when I try ‘GET RELEASES’ and ‘START JOB’ I am getting 405 - Method not allowed on preflight and CORs error on actual API call.

I did give the Authroization header with bearer token fetched from OAuth call. but always getting 405 error.
Following is my fetch method:
fetch(“https://cloud.uipath.com/invenivcsltd/DefaultTenant/odata/Releases?$filter=Name eq ‘ProcessNameFromOrchestrator’”, {

  method: 'GET',
  redirect:'follow',
  headers: {
    'Access-Control-Allow-Origin':'*',
    'X-UIPATH-OrganizationUnitId': '1340217',
    'X-UIPATH-TenantName': 'DefaultTenant',
    'Authorization': 'Bearer '+tokenData.access_token, //OAuth call's token response.
  }
}).then(data => data.json()).catch()

I have also replied issue with Authentication on some other threads but did not get any response (Error:invalid_client getting the Client Credentials - #8 by Madan_Ongole) and hence creating this new topic. I am currently stuck on working with REST API.
Kindly help.

1 Like

Hello @Madan_Ongole!

It seems that you have trouble getting an answer to your question in the first 24 hours.
Let us give you a few hints and helpful links.

First, make sure you browsed through our Forum FAQ Beginner’s Guide. It will teach you what should be included in your topic.

You can check out some of our resources directly, see below:

  1. Always search first. It is the best way to quickly find your answer. Check out the image icon for that.
    Clicking the options button will let you set more specific topic search filters, i.e. only the ones with a solution.

  2. Topic that contains most common solutions with example project files can be found here.

  3. Read our official documentation where you can find a lot of information and instructions about each of our products:

  4. Watch the videos on our official YouTube channel for more visual tutorials.

  5. Meet us and our users on our Community Slack and ask your question there.

Hopefully this will let you easily find the solution/information you need. Once you have it, we would be happy if you could share your findings here and mark it as a solution. This will help other users find it in the future.

Thank you for helping us build our UiPath Community!

Cheers from your friendly
Forum_Staff

I can’t even get Postman working. Either I am a poor API programmer or UiPath’s docs are poor.

1 Like

You are not a poor programmer
The UI path docs are poor.
FWIW, see my post in case it gets you further along, and hopefully in return you can help me out.