I’ve been trying to setup REST APIs to execute a bot but i’m facing trouble.
As per the uipath orchestrator api guide, the first step is to get the Authorization barer token by authenticating myself using “https://platform.uipath.com/api/account/authenticate” API. When i try to make a post request to this, it keeps telling me that my credentials are invalid.
I have tried using swagger, uipath http request and postman but everywhere i get the same error.
Additionally, see here for a project that does it for you:
Main things to keep in mind:
API stayed mostly the same. The only difference is in the Authenticate that previously generated bearerToken, and now generates access_token. There is also a small change in the authentication (it now requires two headers).
All actions from the above guide to authenticate only need to be performed once. Afterwards, you will end up with a refresh token that is permanent and can be used to refresh your access_token.
There is not much need in generating it programmatically. You only need to do it once, because after you have your refresh_token, it is permanent.
This means that you can make 1 API call to refresh your access_token and you don’t have to go back to the messy way of generating the codes