A token is a digital credential used to represent identity, permissions, or access rights in an application or network service.
Security tokens are commonly used in API authentication, authorization, and session management. They allow applications to verify access without requiring users to send their passwords with every request.
Also known as: Authentication token, access token, security token.
A typical token-based authentication process includes:
Tokens may be opaque identifiers or structured values containing claims.
These categories can overlap. For example, an OAuth access token may use the JWT format.
Tokens and passwords serve different purposes.
Tokens can have limited lifetimes and permissions, reducing the need to repeatedly transmit account passwords.
However, a stolen bearer token may still allow unauthorized access.
Session tokens are often stored in secure browser cookies, while API tokens may be included in HTTP authorization headers.
Short expiration periods, secure storage, HTTPS, and appropriate permission scopes help reduce these risks.
Tokens are often required when scraping applications access authorized APIs or protected resources.
For example, a data collection application may use an API access token to retrieve permitted product information.
Proxy servers can route these requests, but they do not replace the need for valid authorization tokens or appropriate access permissions.
An application may include an access token in an HTTP request:
GET /api/products HTTP/1.1
Authorization: Bearer ACCESS_TOKEN
Accept: application/json
The server validates the token before returning the requested information.
If the token is invalid, expired, or lacks the required permissions, the server may reject the request with an HTTP 401 Unauthorized or 403 Forbidden response.
A token is a digital credential used to manage authentication, authorization, and access to protected resources.
Tokens help secure APIs and web sessions by reducing repeated password use and supporting limited access permissions. Proper token storage, expiration, and validation are essential for maintaining security.