How can I enable CORS to call the UiPath API and run a process from the client-side when my UiPath process is deployed on Cloud Orchestrator?
If you are talking about giving access to api …then you need to go to admin and create an external application there which gives you oauth access details
https://docs.uipath.com/automation-cloud/docs/managing-external-applications
Cheers
Hey,
TO be enable CORS, either you can install a CORS plugin in browser, which will make the request to think its CORS complaint and request would go through.
If its a UiPath api, then cors would be enabled you have to reach out to your network team to help you in that regard.
Thanks,
Hope this helps
Hello Anil,
Basically I want to run the process deployed on the cloud orchestrator from a share point side, on a click of a button.
Then enable orchestrator api…and in your sharepoint on click of button give a trigger to call the start job api with required details
For api details check below
<Orchestratorurl>/swagger/index.html
Cheers
Hi @Anil_G ,
i have done that but while calling that api from the sharepoint, we are getting the cors error.
I encountered a CORS error when attempting to run the following APIs:
- API for obtaining the access token: Endpoint:
https://account.uipath.com/oauth/token
This API is used to authenticate and obtain the access token required for making subsequent API requests. - API for retrieving the release key: Endpoint:
https://cloud.uipath.com/${account_logical_name}/${tenant_logical_name}/orchestrator_/odata
This API is used to retrieve the release key for a specific process. - API for starting the process: Endpoint:
${orchestrator_url}/Jobs/UiPath.Server.Configuration.OData.StartJobs
This API is used to initiate the process with the provided input arguments.
While these APIs worked properly in a Node.js environment, I encountered a CORS error when running them in SharePoint. This error occurs due to cross-origin restrictions imposed by web browsers.
To address this, I attempted to create an external application in UiPath Cloud Orchestrator. However, when using the “https://cloud.uipath.com/identity_/connect/token” API to obtain the token, I received a 404 error, indicating that the requested resource was not found.
External application has to be used and I guess you are using a wrong set I believe…please check this
Cheers