HomeGuidesAPI ReferenceChangelog

Authorization Errors

Payitoff API: Authorization Errors

All Payitoff API requests must include an HTTP Authorization header with a Bearer token, such as

Authorization: Bearer LIVELONGANDPROSPER.

The Bearer token is your Payitoff API KeyAPI Key - An authorization key that must be provided as an Authorization Bearer Token in the header of all requests you make to the Payitoff API. This key is considered private and should never be used or visible in client-side code, markup, or public code repositories..

If your API request neglects to provide the Authorization header, you will receive a 401 Unauthorized HTTP response, and the following AuthorizationError response body:

{
  "error": {
    "detail": "Please include an authorization header.",
    "title": "Unauthorized"
  }
}

If your API request provides an Authorization header, but neglects to include the Bearer token, you will receive a 401 Unauthorized HTTP response, and the following AuthorizationError response body:

{
  "error": {
    "detail": "Please include a Bearer token in your header.",
    "title": "Unauthorized"
  }
}

If your API request provides an Authorization header, but includes an invalid Bearer token, you will receive a 401 Unauthorized HTTP response, and the following AuthorizationError response body:

{
  "error": {
    "detail": "Invalid token.  Please check and try again.",
    "title": "Unauthorized"
  }
}

Did this page help you?