API Tokens
Personal access tokens let you authenticate with the A vs B CLI and REST API without using your email and password. Each token belongs to your account personally and carries the same permissions as your role in the organization.
What are personal access tokens?
A personal access token (PAT) is a long, randomly generated string that acts as a credential. You pass it in API requests or CLI commands instead of your password. Tokens are useful when:
- You want to automate tasks using the A vs B CLI in a script or CI/CD pipeline
- You are building a tool or integration that calls the A vs B REST API programmatically
- You want to grant a specific tool access to your account without sharing your real password
Tokens can be revoked at any time without affecting your account password or other tokens.
Token format
All personal access tokens start with the prefix pat_ followed by a long random string — for example: pat_abc123xyz.... This prefix makes it easy to identify A vs B tokens if they appear in logs or configuration files.
Creating a token
Open Account Settings
Go to the Auth Tokens tab
Click Create Token
Enter a name
Copy the token immediately
Token limit
Each user can have a maximum of 10 personal access tokens active at one time. If you reach the limit, revoke a token you no longer need before creating a new one.
Viewing your tokens
The Auth Tokens tab lists all your active tokens. For each token you can see:
- Name — the label you gave the token when creating it
- Created — when the token was generated
- Last used — the most recent time this token was used to authenticate a request, shown as a relative time (e.g., "3 days ago"). If the token has never been used, this shows "Never".
The token value itself is not shown in the list — only the name and metadata. This is intentional: if someone gains access to your account, they cannot see your existing tokens.
Revoking a token
To revoke a token, click the Revoke button next to it in the token list and confirm the action. Revocation is immediate — any script or tool using that token will immediately start receiving authentication errors. Create a new token and update your tool if you need to restore access.