The auth code and code verifier are just the first step. There is a list of steps after that (outlined in the document referenced earlier) that will allow you to call any cloud API after that.
Yes, I have seen this and tested it successfully.
Rather, I was referring to the fact that not always the unrestricted access to all endpoints should be guaranteed. Assuming that the API is used by a (third-party) integration, you only want to give them access to 2-3 specific endpoints.
Generally, it seems to me that the authentication process is quite error-prone as it involves many copy & paste steps (e.g. from parts of the URL).
So one idea I have is to create some kind of “API user” directly in the Cloud UI with specific endpoint permissions and access key that is sufficient to authenticate. Would this be an option?
Yeah the authentication process is kinda difficult to automate with the NodeJS encryption and URL copying
Absolutely. Our plan is to have a cleaner API experience. This is a temporary workaround for now during the Public Preview stage.
Has anyone created an automation for the refresh that they would be willing to share?
Also @ tarekmadkour when will the permanent solution be released?
Welcome to our UiPath Forum!
Sure, have a look at this project:
CloudAPI_GetAccessToken.zip (12.0 KB)
It basically recreates the steps from the Cloud API guide in 4 ‘simple’ workflows:
I will rush it out, even though some functionality still needs to be added. But maybe someone here on the Forum could take care of that
You will need Chrome for it to work
Fantastic - thanks, Maciej. I put my own project together but made all the JSON calls outside UiPath as I wasn’t aware of the web.activities package which I have to thank you for introducing me to as well!
I am new to UIPath, I created my ID today using Basic Authentication(Even Reset the password)
I followed Consuming Cloud API but unable to authenticate.
The credentials are the same that I used to login and it works.
Welcome to our UiPath Forum.
You need to follow the steps provided in the link below to be able to authenticate and make API calls on Cloud Orchestrator.
UPDATE [June 11]: This new API guide describes how to consume APIs for cloud tenants for all new and migrated accounts going forward: https://orchestrator.uipath.com/v2019/reference#consuming-cloud-api
I made an account using using Sign up with Email (used iCloud)
Now for using the following API
tenancyName: From the Services Tab
usernameOrEmailAddress: Same with which I created the account
password: Same with which I created the account
As I get to know that it has moved to the Cloud, I followed the link: https://orchestrator.uipath.com/v2019/reference#consuming-cloud-api
- Getting Token to Use in Your API Calls.(Works)
- Discovering UiPath Account and Service Instance Identifiers.(Works)
Now while authenticating I use the following
POST: https://platform.uipath.com/[account_logical_name]/[ service_instance_logical_name]/api/account/authenticate
“tenancyName” : “serviceInstanceName”,
“usernameOrEmailAddress” : “XXXXXXXXX”,
“password” : “XXXXXXXXX”
I am getting Invalid Credentials. I use the same emailId and password to login and it works
One crucial thing is that you should no longer use the authenticate endpoint. You should use the method of authenticating from the Cloud API guide and then use the access_token generated from those activities to authenticate your calls.
See my post here with a sample project and sample calls you can easily make
Thanks, This made me understand
I followed the Consuming Cloud API document but failed to get token. Btw I created a new account.
Any help will be appreciated
You need to pass the information as json in the body of the message not as parameters.
In “postman”, remove the parameters you have and go to the “body” tab and paste the information there as specified in the documentation. Make sure you specify “json” as the type of the body. This should make it work.
I want automate the access token request process inside a NodeJS script, but I stopped in the step that need to pass the credentials to the login page, anyone have idea how to pass the user/password by parameters or http headers? Or when we will have way to generate an API key to use direct to cloud api service? Tks a lot!
Welcome to our UiPath Forum!
Please see my post above:
It contains a working example of this exact automation, together with an example API call
Thanks for reply, but I want to automate outside of uipath using nodejs, so I want to know if have a way to send a post directly to the url https://account.uipath.com/usernamepassword/login using a request payload to use a chain like this
Thank you very much. It worked!
I’m trying to authenticate by sending a GET and a POST to https://cloud.uipath.com/oauth/token,
however, as a response I get a HTML string, not the token in a json format.
I’m using Zapier to send the request, I tried adding “accept: application/json” and “request: application/json” in the headers but no success.
I appreciate any help.
Is there any way to get [Authorization code] via API without going to browser.