Personal Access Tokens
Personal access tokens are long-lived credentials tied to your A vs B account. They authenticate the CLI tool when you run avsb login, and they can be used to make direct API requests on your behalf. Unlike session-based authentication, tokens work without a browser — making them suitable for developer tooling and automation.
What tokens are for
- CLI authentication — the
avsbcommand-line tool uses a token to authenticate with the A vs B API. When you runavsb login, you are prompted to paste a token. This is the primary use case. - Direct API access — if you are building a custom integration or script that calls the A vs B REST API, you can include a token in the
Authorizationheader to authenticate the request.
Token format
All personal access tokens follow a consistent format: the prefix pat_ followed by a 64-character hexadecimal string. A token looks like this:
1pat_a3f8c2d1e5b9f04712c8a6e3d0b7f29e1a4c5d8f3e2b1a0c9d7f6e5b4a3c2d1The pat_ prefix makes tokens easy to identify and easy to grep for in code reviews and secret scanning tools.
Creating a token
Open Account Settings
Go to the Auth Tokens tab
Click Create Token
Enter a name
Copy the token immediately
Token limits
Each user account can have a maximum of 10 active tokens at a time. If you have reached the limit and need to create a new one, you must first revoke an existing token.
Using a token in the CLI
Run avsb login in your terminal. The CLI will prompt you to paste your personal access token:
1$ avsb login2Paste your personal access token: pat_a3f8c2d1...3Logged in as jane@example.com (Acme Corp)The token is stored securely in your system's credential store (the macOS Keychain on Mac, the Windows Credential Manager on Windows, or the ~/.avsb/credentials file on Linux). You will not need to paste it again unless you log out or revoke the token.
Using a token in API requests
Include the token in the Authorization header as a Bearer token:
1curl https://api.avsb.cloud/v1/experiments \2 -H "Authorization: Bearer pat_a3f8c2d1e5b9f04712c8a6e3d0b7f29e1a4c5d8f3e2b1a0c9d7f6e5b4a3c2d1"Last used timestamp
Each token in the Auth Tokens list shows a last used timestamp — the date and time the token was most recently used to make an authenticated request. This helps you identify which tokens are still in active use and which ones can be safely revoked.
Revoking tokens
To revoke a token, go to Account Settings → Auth Tokens and click the delete icon next to the token you want to remove. The token is immediately invalidated — any CLI sessions or API integrations using that token will stop working instantly.
There is no undo for revoking a token. If you revoke a token that is being used by your CLI, you will need to create a new token and run avsb login again.
- Never paste it into Slack, email, or a shared document.
- Never commit it to a Git repository — even a private one. Use environment variables for any automation.
- Never share it with teammates — each person should create their own token.