Automation Cloud
latest
false
Banner background image
Automation Cloud API Guide
Last updated Apr 1, 2024

Using Personal Access Tokens for API Authentication

Personal Access Tokens (PATs) are a secure way to authenticate and authorize API requests. This section will guide you through the process of including tokens in your API requests, and provide guidance on handling authentication errors.

Including tokens in API requests

Authorization header

The most common method is to include the token in the Authorization header of your HTTPS request. Use the Bearer scheme followed by a space and the token value. For example:
Authorization: Bearer {token}Authorization: Bearer {token}

Handling token authentication errors

The most common error while using Personal Access Tokens is 401 Unauthorized. The 401 Unauthorized error might arise if the provided PAT is missing, expired, or lacks the necessary permissions. The error intentionally omits specific information to prevent the exposure of sensitive data.

How to handle the error

  1. Ensure that you've correctly included the token in your request.

  2. Verify that the token has the appropriate scopes for the action you're attempting.

  3. Renew or regenerate the token if it has expired.

  • Including tokens in API requests
  • Authorization header
  • Handling token authentication errors
  • How to handle the error

Was this page helpful?

Get The Help You Need
Learning RPA - Automation Courses
UiPath Community Forum
Uipath Logo White
Trust and Security
© 2005-2024 UiPath. All rights reserved.