Quick Start: Generating Your TNZ Auth Token

Fast-track your TNZ API integration. Learn how to generate, copy, and implement your JSON Web Token (JWT) for secure Basic Authentication headers.

Developers using newer TNZ APIs will need an Auth Token for use in the Authorization header of API calls.

The Auth Token is a JWT (JSON Web Token) and is included as a static header.

This guide provides the direct steps to generate your token.

Locate Your Auth Token

We recommend using a specific API User for each integration:

  1. Log in to the TNZ Dashboard.
  2. Navigate to Users in the main menu.
  3. Select the specific user profile intended for this integration (or click Create to make a new one).
  4. Toggle the Enable API option to Yes.
  5. Click the API tab.
  6. Toggle the Auth Token option to Enabled.
  7. Click the Create Auth Token button to generate your token.

Dashboard - Toggle Auth Token 2

 

Use the Auth Token

Click the Copy button next to the Auth Token string.

Your Authorization header must follow this format:

Authorization: Basic <your-auth-token>

Best Practices & Common Errors


Do Not Share Your Token

  • Don't share this token in client-side code or public repositories. Keep it secure like a password.
  • Use separate TNZ Users and Tokens for different applications, allowing you to limit the scope of damage.

Recycling Your Token

If you believe a token has been exposed, or if you are rotating credentials for compliance:

  1. Return to the API tab for the user.
  2. Click the Recycle icon next to the Auth Token.

Authorization Failure

If you receive a HTTP 401 Unauthorized error, your Authorization header is incorrect. Check the following common errors:

  • Missing Basic prefix.
  • Using an old recycled token.
  • Copying token with whitespace (e.g. inadvertently adding a space to the end of your Auth Token).
  • Transcribing the token (the token is a static encoded value; you should not be transcribing it manually).


Topics:   Developers Installation

Start your free trial today!

Ready to revolutionise your messaging?
Connect with people anywhere - boost engagement, responses and conversations.

20 credits over 14-days. No obligation. No credit card required.