This sample call, which shows the Users API, includes a bearer token in the Authorization request header.

Specifying the user agent

Each request to the API must be accompanied by a user agent request header. Typically this should be the name of the app consuming the service. A missing user agent will result in an HTTP 403 response. The user agent should accurately describe the nature of the API consumer such that it can be clearly identified in the request. Not doing so may result in the request being blocked. A valid request would look include the header:

Authorization: Bearer {api_key}

Example Authenticated Request

Successful Request
Authorization Error Response
Successful Request
curl --location --request GET 'https://{sub-domain}' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'User-Agent: TrustSwiftly/1.0' \ \
--header 'Authorization: Bearer {api_key}'
Authorization Error Response
"error_code": "000",
"error_message": "Api Key Wrong or Unauthorized User"