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.
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.
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.
Using a test token is simple:
Open the API Request Client inside Twidget.
In the Authorization dropdown, select:
Bearer Token (Test)
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.
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.
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.
Path Variables in Client Requests
Twidget allows you to efficiently manage and utilize path variables in your API client requests. Below is a comprehensive guide on how to work with path variables within the platform. Overview. Path variables are placeholders within API endpoints that can be dynamically replaced with actual values a...
API Client Basics
Our API Client allows you to send out API requests, similar to Postman. It's a powerful tool designed to help you test your created endpoints effortlessly. Main Features. 1. Send API Requests: Test your endpoints by sending various types of requests (e.g., GET, POST, PUT, PATCH, DELETE). 2. Save Req...
Authenticating a Request
Why Authenticate Requests?. Authenticating requests is a crucial step in ensuring the security and integrity of your application's data. By validating the identity of users or systems that make API calls, you can prevent unauthorized access, data breaches, and potential misuse of your resources. Aut...