# Orchestrator API Authentication Error

**URL:** <https://forum.uipath.com/t/orchestrator-api-authentication-error/232048>\
**Category:** Orchestrator\
**Tags:** api, orchestrator\
**Created:** [June 18, 2020, 9:35am UTC](https://forum.uipath.com/t/orchestrator-api-authentication-error/232048 "2020-06-18T09:35:30Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![autpat](https://avatars.discourse-cdn.com/v4/letter/a/e480ec/32.png) [@autpat](https://forum.uipath.com/u/autpat)\
**Post date:** [June 18, 2020, 9:35am UTC](https://forum.uipath.com/t/orchestrator-api-authentication-error/232048/1 "2020-06-18T09:35:30Z")

</div>

Hi,  
I am getting error when I am accessing the [Orchestrator](https://docs.uipath.com/orchestrator/docs/introduction) [UiPath](https://cloud.uipath.com/Releases) API.  
Given below Headers:  
Authorization With Bearer token  
X-UiPath-TenantName  
X-UiPath-OrganizationUnitId

 ![image](https://global.discourse-cdn.com/uipath/original/3X/a/6/a6d397f1a07300f8027148ccae99054ba713b7fc.png)

Not sure why I am getting error in response.

Please suggest here

---

<div class="post-metadata">

**Author:** ![Srini84](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/srini84/32/464032_2.png) [@Srini84](https://forum.uipath.com/u/Srini84)\
**Post date:** [June 18, 2020, 9:44am UTC](https://forum.uipath.com/t/orchestrator-api-authentication-error/232048/2 "2020-06-18T09:44:30Z")

</div>

Hi @autpat

check below post for your reference

> [@Steps for authenticating and using Orchestrator cloud API](https://forum.uipath.com/t/steps-for-authenticating-and-using-orchestrator-cloud-api/149111):
>
> Hi All, As I see lot of topics being posted on the authentication of Orchestrator cloud API, I decided to provide the step by step process of authentication and using the API. Here are the steps: Here is the documentation: [About OData and References](https://docs.uipath.com/orchestrator/v2019/reference#consuming-cloud-api) Generating Code Challenge and Code Verifier : a) This is the URL you need to run in any browser [https://repl.it/languages/nodejs.](https://repl.it/languages/nodejs.) and it will open the page like this This is a nodeJS server which will retrieve us the specific code…

Hope this helps

Thanks

---

<div class="post-metadata">

**Author:** ![HareeshMR](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/hareeshmr/32/181825_2.png) [@HareeshMR](https://forum.uipath.com/u/HareeshMR)\
**Post date:** [June 18, 2020, 12:43pm UTC](https://forum.uipath.com/t/orchestrator-api-authentication-error/232048/3 "2020-06-18T12:43:36Z")

</div>

That was old version of authentication,

Please check the below post for the new version

> [@Need help in triggering a job in orchestrator using the orchestrator api's](https://forum.uipath.com/t/need-help-in-triggering-a-job-in-orchestrator-using-the-orchestrator-apis/195190/2):
>
> Steps to do with the new API Login to platform uipath Click on the services tab and near the username, you will have three dots, click on that Click on API access and copy all the details you have there like client id, key and user id whatever Then send a post request to authenticate to the URL : [https://account.uipath.com/oauth/token](https://account.uipath.com/oauth/token) with the headers X-UIPATH-TenantName which you got in the above step and the body { “grant\_type”: “refresh\_token”, “client\_id”: “CLIENT ID you got …

---

<div class="post-metadata">

**Author:** ![autpat](https://avatars.discourse-cdn.com/v4/letter/a/e480ec/32.png) [@autpat](https://forum.uipath.com/u/autpat)\
**Post date:** [June 18, 2020, 1:15pm UTC](https://forum.uipath.com/t/orchestrator-api-authentication-error/232048/4 "2020-06-18T13:15:02Z")

</div>

Hi Hareesh,

Thanks for details steps, I have followed the same:  
Steps to do with the new API

1. Login to [platform](https://platform.uipath.com/) uipath
2. Click on the services tab and near the username, you will have three dots, click on that
3. Click on API access and copy all the details you have there like client id, key and user id whatever
4. Then send a **post** request to authenticate to the URL : [https://account.uipath.com/oauth/token](https://account.uipath.com/oauth/token) with the headers X-UIPATH-TenantName which you got in the above step and the body  
{  
“grant\_type”: “refresh\_token”,  
“client\_id”: “ **CLIENT ID you got from above step** ”,  
“refresh\_token”: “fH5FcbEJLEm6BzuupvIBAb9V2eJkDDcQE1emAhSk-Cuoh”  
}
5. You will get the access token, copy that
6. To get the folders, you need to send a **GET** request to the URL : [https://platform.uipath.com/odata/Folders](https://platform.uipath.com/odata/Folders) with the authorization code and X\_UIPATH\_TENANT\_NAME as the headers.  
[/quote]

For GET folders API I am getting same error

 ![image](https://global.discourse-cdn.com/uipath/original/3X/3/5/3597536b47530b1bed9096a77f31f752ab63d80c.png)

---

<div class="post-metadata">

**Author:** ![autpat](https://avatars.discourse-cdn.com/v4/letter/a/e480ec/32.png) [@autpat](https://forum.uipath.com/u/autpat)\
**Post date:** [June 18, 2020, 1:27pm UTC](https://forum.uipath.com/t/orchestrator-api-authentication-error/232048/5 "2020-06-18T13:27:22Z")

</div>

Hi,

I have copied code in nodejs and got the below output

 ![image](https://global.discourse-cdn.com/uipath/original/3X/a/7/a7951050a222c51693396c1d45adbebfd2baa08a.png)  
Please suggest here.

---

<div class="post-metadata">

**Author:** ![HareeshMR](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/hareeshmr/32/181825_2.png) [@HareeshMR](https://forum.uipath.com/u/HareeshMR)\
**Post date:** [June 18, 2020, 1:27pm UTC](https://forum.uipath.com/t/orchestrator-api-authentication-error/232048/6 "2020-06-18T13:27:29Z")

</div>

Can you let me know the Access token is passed correctly and what are the headers you are trying to send?

---

<div class="post-metadata">

**Author:** ![autpat](https://avatars.discourse-cdn.com/v4/letter/a/e480ec/32.png) [@autpat](https://forum.uipath.com/u/autpat)\
**Post date:** [June 18, 2020, 1:31pm UTC](https://forum.uipath.com/t/orchestrator-api-authentication-error/232048/7 "2020-06-18T13:31:40Z")

</div>

Hi Hareesh,

Yes I have given below Headers:  
Authorization With Bearer token  
X-UIPATH-TenantName

for GET folders API

Actually looking for API solution from last 2 days  
Lot of work pending because of this authentication error

---

<div class="post-metadata">

**Author:** ![HareeshMR](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/hareeshmr/32/181825_2.png) [@HareeshMR](https://forum.uipath.com/u/HareeshMR)\
**Post date:** [June 18, 2020, 1:38pm UTC](https://forum.uipath.com/t/orchestrator-api-authentication-error/232048/8 "2020-06-18T13:38:11Z")

</div>

If you are giving those along with the bearer token you got recently, it should work,  
Can you let me know if the same bearer token working for someother request?

---

<div class="post-metadata">

**Author:** ![autpat](https://avatars.discourse-cdn.com/v4/letter/a/e480ec/32.png) [@autpat](https://forum.uipath.com/u/autpat)\
**Post date:** [June 18, 2020, 1:44pm UTC](https://forum.uipath.com/t/orchestrator-api-authentication-error/232048/9 "2020-06-18T13:44:13Z")

</div>

Hi,

I have tried other GET APIs but getting same authentication error for other APIs also  
[https://cloud.uipath.com/odata/Sessions](https://cloud.uipath.com/odata/Sessions)  
[https://cloud.uipath.com/odata/Releases](https://cloud.uipath.com/odata/Releases)

---

<div class="post-metadata">

**Author:** ![HareeshMR](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/hareeshmr/32/181825_2.png) [@HareeshMR](https://forum.uipath.com/u/HareeshMR)\
**Post date:** [June 18, 2020, 1:48pm UTC](https://forum.uipath.com/t/orchestrator-api-authentication-error/232048/10 "2020-06-18T13:48:35Z")

</div>

I think the issue will be the bearer token, may be it is expired, As far as I know, bearer token will expire in one hour after you got it from the request, Can you try creating new token and try it

---

<div class="post-metadata">

**Author:** ![autpat](https://avatars.discourse-cdn.com/v4/letter/a/e480ec/32.png) [@autpat](https://forum.uipath.com/u/autpat)\
**Post date:** [June 18, 2020, 1:52pm UTC](https://forum.uipath.com/t/orchestrator-api-authentication-error/232048/11 "2020-06-18T13:52:20Z")

</div>

Hi,

FOr every Post request for /oauth/token API will give fresh access\_token.  
And copying the same in other Get APIs.  
But still no luck getting same error.

Is there any setting to update the timeout period for access\_token api

---

<div class="post-metadata">

**Author:** ![HareeshMR](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/hareeshmr/32/181825_2.png) [@HareeshMR](https://forum.uipath.com/u/HareeshMR)\
**Post date:** [June 18, 2020, 2:01pm UTC](https://forum.uipath.com/t/orchestrator-api-authentication-error/232048/12 "2020-06-18T14:01:47Z")

</div>

It is working exactly fine for me,

Can you let me know how you are trying to send the requests?

 ![image](https://global.discourse-cdn.com/uipath/original/3X/5/5/55ab995aee7c44b7b086a2ca4927084d670a43e4.png)

---

<div class="post-metadata">

**Author:** ![autpat](https://avatars.discourse-cdn.com/v4/letter/a/e480ec/32.png) [@autpat](https://forum.uipath.com/u/autpat)\
**Post date:** [June 18, 2020, 2:01pm UTC](https://forum.uipath.com/t/orchestrator-api-authentication-error/232048/13 "2020-06-18T14:01:48Z")

</div>

Hi,

Need to check with UiPath Support team. But I don’t think so UiPath will give support for Community edition.

Because problem is there from last couple of days.  
Not Sure but Is it any UiPath API issue?

---

<div class="post-metadata">

**Author:** ![HareeshMR](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/hareeshmr/32/181825_2.png) [@HareeshMR](https://forum.uipath.com/u/HareeshMR)\
**Post date:** [June 18, 2020, 2:05pm UTC](https://forum.uipath.com/t/orchestrator-api-authentication-error/232048/14 "2020-06-18T14:05:52Z")

</div>

> [@HareeshMR](#):
>
> Can you let me know how you are trying to send the requests

Please let me know this @autpat

and for community edition, we have a team here to help you. We are happy to help you until you found the solution 🙂

---

<div class="post-metadata">

**Author:** ![autpat](https://avatars.discourse-cdn.com/v4/letter/a/e480ec/32.png) [@autpat](https://forum.uipath.com/u/autpat)\
**Post date:** [June 18, 2020, 2:07pm UTC](https://forum.uipath.com/t/orchestrator-api-authentication-error/232048/15 "2020-06-18T14:07:10Z")

</div>

Hi,

Please go through the below request details screen shot,  
Getting same issue

 ![image](https://global.discourse-cdn.com/uipath/original/3X/2/e/2e299efd6997b176e6da666b98a8525070fe5025.png)

---

<div class="post-metadata">

**Author:** ![HareeshMR](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/hareeshmr/32/181825_2.png) [@HareeshMR](https://forum.uipath.com/u/HareeshMR)\
**Post date:** [June 18, 2020, 2:10pm UTC](https://forum.uipath.com/t/orchestrator-api-authentication-error/232048/16 "2020-06-18T14:10:54Z")

</div>

You are selecting bearer token as the authentication type, you don’t need to give **“Bearer”** along with the token.

You need to give it when you are passing the value in headers @autpat

This will resolve your issue if the token is generated within one hour

---

<div class="post-metadata">

**Author:** ![autpat](https://avatars.discourse-cdn.com/v4/letter/a/e480ec/32.png) [@autpat](https://forum.uipath.com/u/autpat)\
**Post date:** [June 18, 2020, 2:13pm UTC](https://forum.uipath.com/t/orchestrator-api-authentication-error/232048/17 "2020-06-18T14:13:40Z")

</div>

Hi,

I have removed Bearer string and added newly generated access\_token.  
But still getting same error

 ![image](https://global.discourse-cdn.com/uipath/original/3X/b/0/b0ba34db392761db7f034ceedcc1b93e37de3151.png)

---

<div class="post-metadata">

**Author:** ![HareeshMR](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/hareeshmr/32/181825_2.png) [@HareeshMR](https://forum.uipath.com/u/HareeshMR)\
**Post date:** [June 18, 2020, 2:19pm UTC](https://forum.uipath.com/t/orchestrator-api-authentication-error/232048/18 "2020-06-18T14:19:24Z")

</div>

Can you let me know the headers also @autpat

---

<div class="post-metadata">

**Author:** ![autpat](https://avatars.discourse-cdn.com/v4/letter/a/e480ec/32.png) [@autpat](https://forum.uipath.com/u/autpat)\
**Post date:** [June 18, 2020, 2:24pm UTC](https://forum.uipath.com/t/orchestrator-api-authentication-error/232048/19 "2020-06-18T14:24:02Z")

</div>

Hi,

Please go through the below header details:

 ![image](https://global.discourse-cdn.com/uipath/original/3X/3/4/34880f030e322de836f3786954718d6765d03cf3.png)

---

<div class="post-metadata">

**Author:** ![HareeshMR](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/hareeshmr/32/181825_2.png) [@HareeshMR](https://forum.uipath.com/u/HareeshMR)\
**Post date:** [June 18, 2020, 2:26pm UTC](https://forum.uipath.com/t/orchestrator-api-authentication-error/232048/20 "2020-06-18T14:26:30Z")

</div>

I’m not sure what you are missing here,

I know I’m asking too many questions, but can you let me know whether you are using id\_token or access\_token?

Can you add content-type :application/json as below

![image](https://global.discourse-cdn.com/uipath/original/3X/8/a/8a95734f67b9e34b288af50616be1ceca08afe68.png)

[Next page](https://forum.uipath.com/t/orchestrator-api-authentication-error/232048.md?page=2)
