Customer Signup, Login and Logout
Build customer signup, login and logout for your application. Follow the authentication endpoints and test the customer session flow.
Watch tutorial (4:41)
Build customer signup, login and logout for your application. Follow the authentication endpoints and test the customer session flow.
Watch tutorial (4:41)
Configure authentication when sending requests from the API client.
Recorded with an earlier Twidget interface. Names, control locations and available options may differ; use the linked documentation for current guidance.
Watch tutorial (2:59)
Build customer authentication, secure task workflows and a working page; verify record ownership with two customers.
Watch tutorial (39:42)Twidget supports Bearer Authentication to ensure secure access to your endpoints. You can specify which endpoints should be secured or open. Once secured, an endpoint can only be accessed using a valid Bearer Token, which is generated via our API. Additionally, we provide functionality to generate authentication endpoints to handle user sign-up and token generation.
Bearer Authentication is a security mechanism for ensuring that only authorized users can access certain resources. It is commonly used in API security protocols and involves the use of Bearer Tokens.
A Bearer Token is a type of access token that is included in the HTTP headers of a request. This token is used to authenticate requests to protected resources:
Format: Typically, a Bearer Token is a string that is generated by the authentication server.
Usage: The client must include this token in the Authorization header of their HTTP requests to access secured endpoints.
Example:
Authorization: Bearer <token>
Bearer token in the Authorization header of a request
User Sign-Up/Login: Users sign up or log in via an authentication endpoint. During this process, they provide credentials which are validated by the server.
Token Generation: Upon successful authentication, a Bearer Token is generated by the server and returned to the user.
Access Secured Endpoints: The user includes the Bearer Token in the HTTP headers when making requests to secured endpoints. The server verifies the token before granting access to the resource.
Twidget allows you to specify which endpoints should be secured. You can do this via a straightforward configuration:
Unsecured Endpoints: These endpoints are open to all users and do not require a token for access.
Secured Endpoints: These endpoints require a valid Bearer Token. Without the token, access to the resource is denied.

Twidget enables you to easily generate the necessary authentication endpoints for user sign-up, login, and token generation. These endpoints include:
Sign-Up Endpoint: Allows new users to register and receive a Bearer Token upon successful registration.
Login Endpoint: Allows existing users to log in and receive a Bearer Token upon successful authentication.
Account workflows: The generator also offers current-customer details, logout, password update and password recovery. It does not generate a separate token-refresh endpoint. Review Creating Authentication Endpoints for the exact generated routes and Customer authentication tools for session and recovery commands.
User Sign-Up: The user sends a POST request to the sign-up endpoint with their credentials.
User Login: The user sends a POST request to the login endpoint with their credentials.
Token Response: Upon successful authentication, the user receives a Bearer Token.
Access Resource: The user includes the Bearer Token in the Authorization header when requesting a secured resource.
Bearer Authentication is a robust security mechanism to protect your API endpoints. By leveraging the features provided by Twidget, you can easily implement and manage authentication, ensuring that only authorized users have access to your secured resources.
Endpoint Basics
An endpoint refers to a specific URL (Uniform Resource Locator) that a client can access to interact with the API and perform various operations. Endpoints act as gateways that allow clients (such as web or mobile applications) to communicate with the server hosting the API and perform actions like ...
Action Stats
Action Stats gives Twidget administrators a history of endpoint calls and event runs. It is an admin tool, rather than a workspace feature available to every team member. Find a run. Open Action Stats in the admin sidebar. Filter by workspace, organization, action type, test or real call, result, st...
API Limits
API limits help you control how often people can call the endpoints in a workspace. You can set a short-term limit and a monthly allowance. Set workspace limits. 1. Select the workspace you want to manage. 2. Open Settings, then API Limits. 3. Enable API limits. 4. Under Allowance per, choose user o...
Response Settings
You can customise the successful response from an endpoint, including its status code and additional headers. Configure a response. 1. Open the endpoint and its Output editor. 2. Select RESPONSE. 3. Choose a status code or select a variable from the commands section. 4. Add a response-headers object...
Streaming responses
Send updates progressively while an endpoint is running, instead of waiting for one final response. This is useful for progress messages or generated text that your app can display as it arrives. Enable a streaming endpoint. 1. Open the endpoint and choose Update endpoint. 2. Set Response mode to St...