# API Workflows Studio | HTTP Request

**URL:** <https://forum.uipath.com/t/api-workflows-studio-http-request/5472568>\
**Category:** API Workflows\
**Tags:** agent, api-workflow, orchestrator\
**Created:** [September 29, 2025, 2:19pm UTC](https://forum.uipath.com/t/api-workflows-studio-http-request/5472568 "2025-09-29T14:19:26Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![ashton.lalchan](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/ashton.lalchan/32/496858_2.png) [@ashton.lalchan](https://forum.uipath.com/u/ashton.lalchan)\
**Post date:** [September 29, 2025, 2:19pm UTC](https://forum.uipath.com/t/api-workflows-studio-http-request/5472568/1 "2025-09-29T14:19:26Z")

</div>

I am currently working on API workflows for Orchestrator APIs for an Agent.

1. I have authenticated via swagger and tested a couple of APIs within SWAGGER ( e.g. releases, processes, Robot Logs)
2. I have provided the Get URL, Bearer token, and Accept Application/json as arguments
3. However when I test in Studio- API workflows it runs Fine when I an debugging/testing, but after a while it fails to get the API HTTP Request. (see image)

How can I confirm, given the authentication that it will always work when querying via an Agent?

 ![image](https://global.discourse-cdn.com/uipath/original/4X/9/2/5/92564af62ce834cede2dbfb9c1c6ca2cb6516f92.png)

---

<div class="post-metadata">

**Author:** ![arjun.shiroya](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/arjun.shiroya/32/545217_2.png) [@arjun.shiroya](https://forum.uipath.com/u/arjun.shiroya)\
**Post date:** [September 29, 2025, 3:05pm UTC](https://forum.uipath.com/t/api-workflows-studio-http-request/5472568/2 "2025-09-29T15:05:52Z")

</div>

Hi, @ashton.lalchan This usually happens because your Bearer token expires after a while. Try refreshing or requesting a new token automatically in your workflow whenever you get an “unauthorized” error. That way your API calls will stay reliable even when running unattended

---

<div class="post-metadata">

**Author:** ![ashton.lalchan](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/ashton.lalchan/32/496858_2.png) [@ashton.lalchan](https://forum.uipath.com/u/ashton.lalchan)\
**Post date:** [September 29, 2025, 3:24pm UTC](https://forum.uipath.com/t/api-workflows-studio-http-request/5472568/3 "2025-09-29T15:24:58Z")

</div>

Hi @arjun.shiroya,

Thanks for the response, is there a specific activity/property for this in the API workflow?

I ask becuase the bearer token was manually entered in the workflow for the HTTP request. I dont see an option to have it automatically generate thereafter.

---

<div class="post-metadata">

**Author:** ![Anil\_G](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/anil_g/32/524291_2.png) [@Anil\_G](https://forum.uipath.com/u/Anil_G)\
**Post date:** [September 29, 2025, 3:42pm UTC](https://forum.uipath.com/t/api-workflows-studio-http-request/5472568/4 "2025-09-29T15:42:54Z")

</div>

@ashton.lalchan

ideally you would create a custom connector and give the authentication details there..for that you need to create an external application

then auth would be taken care and you can use the apis

check here on how to do it

> **[Automation Cloud - Managing external OAuth applications](https://docs.uipath.com/automation-cloud/automation-cloud/latest/admin-guide/managing-external-applications)**
>
> The UiPath Documentation Portal - the home of all our valuable information. Find here everything you need to guide you in your automation journey in the UiPath ecosystem, from complex installation guides to quick tutorials, to practical business...

cheers

---

<div class="post-metadata">

**Author:** ![arjun.shiroya](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/arjun.shiroya/32/545217_2.png) [@arjun.shiroya](https://forum.uipath.com/u/arjun.shiroya)\
**Post date:** [September 29, 2025, 3:45pm UTC](https://forum.uipath.com/t/api-workflows-studio-http-request/5472568/5 "2025-09-29T15:45:09Z")

</div>

@ashton.lalchan Just add an HTTP Request before your main API call to get a new Bearer token using your client credentials. Store that token in a variable and use it in the Authorization header. If your API call fails with “unauthorized,” fetch a new token and retry. This keeps your calls running even when tokens expire.

---

<div class="post-metadata">

**Author:** ![ashton.lalchan](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/ashton.lalchan/32/496858_2.png) [@ashton.lalchan](https://forum.uipath.com/u/ashton.lalchan)\
**Post date:** [September 29, 2025, 7:01pm UTC](https://forum.uipath.com/t/api-workflows-studio-http-request/5472568/6 "2025-09-29T19:01:44Z")

</div>

@arjun.shiroya theres no option to add that in API workflows in studio

---

<div class="post-metadata">

**Author:** ![arjun.shiroya](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/arjun.shiroya/32/545217_2.png) [@arjun.shiroya](https://forum.uipath.com/u/arjun.shiroya)\
**Post date:** [September 29, 2025, 8:04pm UTC](https://forum.uipath.com/t/api-workflows-studio-http-request/5472568/7 "2025-09-29T20:04:43Z")

</div>

@ashton.lalchan you need to use a separate workflow, a custom connector or manage authentication through an external application/Integration Service. Sorry for any confusion earlier this clarification should help keep your project on the right track.

---

<div class="post-metadata">

**Author:** ![Ehab\_Sawars](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/ehab_sawars/32/401516_2.png) [@Ehab\_Sawars](https://forum.uipath.com/u/Ehab_Sawars)\
**Post date:** [October 30, 2026, 2:02pm UTC](https://forum.uipath.com/t/api-workflows-studio-http-request/5472568/8 "2026-10-30T14:02:16Z")

</div>

A token copied from Swagger is temporary. For unattended calls, use an Integration Service connection with OAuth client credentials for a confidential UiPath External App, then select that connection in the HTTP activity. The authentication framework handles token acquisition; don’t pass the access token through the agent prompt.

The app still needs the relevant Orchestrator application scopes and folder permissions. Test releases/processes/logs under that app identity, since Swagger tested your user identity. Check the actual failed HTTP status too: token renewal can address an expired-token 401, but it won’t fix a 403 caused by missing access.
