Developer Docs - Trust Swiftly
  • Developer Documentation
  • Web
    • Integration
    • Button Link
    • WordPress
    • WebView iOS and Android
    • Bubble ID Verify Integration
    • FlutterFlow Identity Verification
    • Webflow ID Verification
    • Zapier Identity Verification
  • API
    • Getting an API Key
    • Authentication
    • Users
    • Reverify User
    • Documents
    • Stats
    • Templates
    • Errors
    • Pagination
    • Filtering and Sorting
    • Rate Limits
  • Webhooks
    • Setup and Handling Webhooks
    • Webhook Code Examples
  • Hosted Link
    • Share hosted link
  • Self Sign Up and Create Autofill
    • Configure self verifications
    • Prefill User Creation
  • Single Sign On
    • SAML2 SSO (Okta, etc)
    • Rippling SSO App
    • Azure Entra ID SAML
  • Notifications
    • Slack
    • Zoho Cliq
    • Email and Web Push
  • Stripe App
    • Install and Demo Guide
    • Disconnect Stripe App
  • References
    • Supported Documents
  • Links
    • Trustswiftly.com
    • Sign Up
Powered by GitBook
On this page
  1. API

Authentication

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

PreviousGetting an API KeyNextUsers

Last updated 3 months ago

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

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

Replace {sub-domain} with the relevant name of your Trust Swiftly account. i.e. the endpoint might be

Validate All Keys

To check your credentials are correct you can use the verify-credentials endpoint with your API key.

POST /api/verify-credentials
https://example.trustswiftly.com