JSON Web Tokens (JWTs) are signed JSON objects that authenticate your API requests.
After you authenticate with application tokens (or, temporarily, user credentials for specific cross-Workspace APIs), the API returns a JWT called auth_token.
Include the auth_token in the Authorization header of every API request using the Bearer scheme:
The following example shows how to include the auth_token when creating a new user:
Don’t confuse auth_token with application_token.
Application tokens are long-lived credentials you use to obtain an auth token.
The auth token is what you include in API request headers.
A JWT consists of three parts separated by dots: header.payload.signature
To inspect a JWT’s contents, use jwt.io or decode it in your application.
Never share your auth tokens publicly. If you use jwt.io, be aware that the token contents are visible and could be logged. For production debugging, decode tokens locally.
Example using Python:
When your auth_token expires, API requests return a 401 Unauthorized error.
To handle this:
401 response in your applicationTo avoid failed requests, track token expiration and refresh proactively.
For user credentials, the auth_token expires after 240 minutes.