Personal access tokens and API access
Minting a token for scripts, what its scopes mean, and the one thing a token can never do.
Written By Dustin
Last updated About 5 hours ago
A personal access token is a bearer credential for scripts and tools that cannot open a browser to sign in. You mint it from your account security settings; it carries the prefix tvop_ so it is recognisable if it ever turns up somewhere it should not be.
Minting one
A name, so you can tell your tokens apart later. The list shows the name, the prefix, the last four characters, when it was created, and when it was last used.
Scopes — read your account, read repositories, write to repositories.
An optional restriction narrowing the token to named organizations or named repositories.
An expiry, which is required, and can be at most one year out. There is no such thing as a permanent token here.
The token value is shown exactly once, at creation. The service keeps only a hash of it plus the display metadata, so it genuinely cannot show it to you again — or to anyone who breaks into the store. Copy it into your secret manager before you close the dialog.
The one thing a token can never do
A personal access token can never satisfy a step-up requirement. Step-up asks for proof that a human is present at the moment of the action, and a bearer token cannot attest presence — so where an organization requires step-up, a token is refused outright rather than sometimes working. Approving or landing a proposal, breaking a lock, changing settings, minting another token, and requesting a reviewer are the operations that can be put behind it.
This is deliberate, and it is the reason not to script around a review gate: the credential that could automate it is the credential that is refused.
Revoking
Deleting a token revokes it immediately. Do that first and investigate afterwards if a token may have leaked — a token is cheap to re-mint and the expiry you set does not help you today.
A token is not a capability token
These are different objects for different jobs, and conflating them is a common mistake:
A personal access token authenticates you to the hosted API. It is a bearer secret held by the service.
A capability token authorises an agent to act, with a scope enforced cryptographically before any seal. The AI agents collection covers those.
Do not hand an agent a personal access token in place of a properly scoped capability token. One is an identity; the other is a bounded permission.
Never paste one anywhere
Not into a support message, not into an issue, not into a feedback post, and not into a repository. If you are collecting diagnostics, the troubleshooting collection names what to redact first.