API token
A long-lived secret ("BAT-" and forty hex characters) that an integration logs in with. Bound to one node, limited by scopes, an expiry date and optional CORS and IP allow-lists; shown once when created.
An API token is the credential for software. It is created by an Account, never by another API token, and every request that presents it is checked against its record: status, expiry, IP and CORS rules. The secret is returned exactly once; the server stores only a hash and the last four characters.
Every token is bound to a Node. It sees that node and everything below it and nothing else, the way a chroot limits a process to a directory. What it may do there is a list of scopes such as fs:read, query:run or model:upload, or the universal *. Tokens created before scopes existed carry the legacy READ/WRITE credentials instead; tokens older than that are refused and must be recreated.
Every token has an expiry date: one month ahead unless the creator chooses a date, and never more than three years ahead. Reminders go out seven, three and one day before. The token can also be restricted to a list of origins (cors_enabled_domains) and to a list of IP addresses. Logging in with the token yields an Auth token; the token itself is never sent on ordinary requests. See Tokens and delegation.