Orchestrator api : 403 while adding queue item

I’m calling the Orchestrator API to add a queue items and getting a 403 error. i already have a valid token. what’s missing??
Thanks:)

Add folder context: X-UiPath-OrgaanizationId":12345" Orchestrator rejects requests without it.

Hi @Aarya_singh ,

A 403 error happens because the token is valid but the folder permissions are missing.

Please try below approach -

  1. Add Queues → Create (and Edit) permission for the user/robot in the same folder where the queue exists.

  2. Make sure your API request includes the correct X-UiPath-OrganizationUnitId (Folder ID).

  3. Retry the AddQueueItem call.

Cheers

I added the x-ui-path-organizationUnitId header and that finally fixed my 403 forbidden error so that part is working now.

But right after solving that. i ran into a new issue. Orchestrator now says the folder ID is invalid or doesnt match the process, even though i am using the same folder where my queues and process exist.

1 Like

The folder ID is correct the issue is folder-level access or resource mismatch.

Try this approach-

  • Queue and Process must be in the same Modern Folder.

  • Give the user/robot Queues (View/Create) + Processes (View) + Jobs (Create/View) permissions in that folder.

  • Refresh the token after changing roles.

Cheers

This happens when the folder ID You’re sending doesn’t match the folder your queue belongs to. Use the exact folder ID from:

Orchestrator->Folders->Select Folder->URL ID

and Add both:
X-UiPath-FolderPath:“folderName”
X-UiPath-OrganizationUnitId:“12345”

Note:–> both headers must point to the same folder, or orchestrator rejects the rejects the request.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.