How to make use of PAT (Personal Token Authentication) mechanism to authorize API calls?
Generating a Personal Access Token (PAT):
- Log in to UiPath Automation Cloud: Navigate to https://cloud.uipath.com/ and log in with your UiPath account.
- Access User Profile Settings: In the top-right corner, click on your user profile avatar and select "User Profile" or "Profile" from the dropdown menu.
- Navigate to the Access Tokens Section: In your profile page, locate the "Personal Access Tokens" tab. This is typically found in the left-hand navigation or as a separate section on the profile page.
- Create a New Token: Click on "Add New Token" or a similar button.
- Provide a meaningful name for your token (e.g., API_Integration_Token).
- Select the desired Scope(s) or Permissions for your token. For Orchestrator APIs, make sure the token has the appropriate access permissions corresponding to the actions you intend to perform (e.g., view jobs, start jobs, manage assets, etc.).
5. Generate and Save the Token: Once you click “Create” or “Generate,” a PAT will be displayed. Copy it immediately because tokens are shown only once. Store it securely in a password manager or a secure configuration store.
Important: Treat the PAT like a password. Anyone with this token can perform the actions it authorizes.
Postman Example:
- Set the request type to GET.
- Paste the URL.
- Under Authorization tab, select the Auth type as Bearer token and provide the generated PAT.
- Send the request.
If your token is valid and you have the necessary permissions, the API should return a successful response (e.g., a JSON list of folders).