Sign Up

Authentication Test Tokens

When working with authenticated endpoints, you normally need to create a user, generate an authentication token, and include it in your request for testing. To make this process easier, Twidget provides automatic test tokens within the built-in API Request Client.

Test tokens allow you to quickly test secure endpoints without setting up real authentication credentials or creating user accounts.

What Are Test Tokens?

A test token is a temporary authentication token created automatically by Twidget for the purpose of testing your endpoints. It behaves like a valid token but with two key restrictions:

  • It only works inside Twidget’s API Request Client

  • It is generated at the start of the request and immediately destroyed after use

This means you can safely test authenticated logic without risking security exposure or cluttering your project with temporary users.

Why Use Test Tokens?

Test tokens allow you to:

  • Test authenticated endpoints instantly

  • Avoid manually creating users

  • Skip generating or managing real bearer tokens

  • Validate your authorization logic during development

  • Speed up iteration when building backend features

They are ideal for development, debugging, and quick endpoint checks.

How to Use Test Tokens

Using a test token is simple:

  1. Open the API Request Client inside Twidget.

  2. In the Authorization dropdown, select:

    Bearer Token (Test)

  3. Send your request as usual.

When selected, Twidget will:

  • Automatically generate a valid temporary token

  • Attach it to your request

  • Destroy the token immediately after the request completes

No additional setup is required.

Important Notes

  • Test tokens do not work in external API tools (e.g., Postman, Insomnia, custom clients).

  • They are only valid for the request you send within Twidget’s API Request Client.

  • They behave like real tokens for authentication and authorization logic, allowing full endpoint testing.

Summary

Test tokens provide a fast, safe, and convenient way to test authenticated endpoints inside Twidget without the overhead of managing real authentication. Simply choose “Bearer Token (Test)” in the Authorization menu, and Twidget handles the rest.

Related Topics