API tokens
PreviewHow much a token was used in the last 30 days
GET
cookie
better-auth.session_token<token>Better Auth session cookie. Production uses the __Secure- prefixed name.
tokenId*stringFormat
uuidCounts of the token's calls.
application/json- response
days*integerHow many days the counts cover.
total*integerallowed*integerdenied*integerlimited*integerlastUsedAt?stringFormat
date-timecurl -X GET 'https://wardn.example.com/api/v1/api-tokens/497f6eca-6276-4993-bfeb-53cbbbba6f08/usage'Example Response
{ "days": 0, "total": 0, "allowed": 0, "denied": 0, "limited": 0, "lastUsedAt": "2019-08-24T14:15:22Z"}Revoke a token POST
Every secret of the token stops working at once. The token stays in the list as revoked. It cannot be undone.
A token's recent calls GET
Newest first. Every call is recorded, allowed or not; a denied call was outside what the token or its owner may do, and a limited one went over the token's rate limit.