What is an API Token?

An API token is a credential — typically a signed or randomly generated string — that a client presents on each request to prove it has been authenticated and is authorized for a specific scope of access.

Tokens differ from simple API keys in a few important ways: they're often short-lived (expiring after minutes or hours), scoped to specific permissions rather than blanket account access, and in the case of JWTs, self-contained — the token itself carries claims like user ID, tenant, and granted scopes that a server can verify without a database lookup, using a cryptographic signature. Because tokens expire, systems built around them need a refresh flow: when the access token nears expiry, the client uses a longer-lived refresh token to get a new one, without forcing the user to log in again. This balances security (a stolen access token has a short useful life) against usability (the user isn't constantly re-authenticating). Token handling is a common source of real security bugs: trusting an unverified claim inside a token, failing to check expiry, or accepting a token whose signature wasn't actually validated against the expected signing key are all classic mistakes that effectively defeat the whole point of using tokens in the first place.

In practice with Neotask

Neotask's protected API routes verify the signature and expiry of every access token server-side and derive tenant scope only from its verified claims — never from a client-supplied header — so a forged or stale token is rejected before it reaches any route logic.

Related terms

Start free

Plans

Free

$0/mo

Download without a card and start for free.

Individual

$50/mo

The full personal agent platform for one person.

Enterprise

$200/mo

Multiple workspaces and capacity for larger teams.

Continue