Managing API Tokens
To use the CircleCI API or view details about a build, you will need API tokens with the appropriate permissions. This document describes the types of API tokens, as well as how to create and delete them.
There are two types of API tokens you can create within CircleCI.
- Personal: These tokens are used to interact with the CircleCI API and grant full read and write permissions.
These tokens provide information about specific projects
and only grant read permissions.
Project tokens have three scope options: Status, Build Artifacts, and All.
- Status tokens grant read access to the project’s build statuses. Useful for embedding status badges.
- Build Artifacts tokens grant read access to the project’s build artifacts.
- All tokens grant read access for the project’s build statuses and build artifacts.
Note: API tokens cannot be modifed after they have been created. The only way to change existing tokens is to delete and recreate them.
Creating a Personal API Token
- In the CircleCI application, go to your User settings.
- Click Personal API Tokens.
- Click the Create New Token button.
- In the Token name field, type a memorable name for the token.
- Click the Add API Token button.
- After the token appears, copy and paste it to another location. You will not be able to view the token again.
To delete a personal API token, click the X in the Remove column.
Creating a Project API Token
- In the CircleCI application, go to your project’s settings by clicking the gear icon next to your project.
- In the Permissions section, click on API Permissions.
- Click the Create Token button.
- Choose a scope from the dropdown menu.
- In the Token Label field, type a memorable label for the token.
- Click the Add Token button.
To delete a project API token, click the X in the Remove column. When the confirmation window appears, click the Remove button.
API tokens are not useful unless you do something with them. Here are a few ideas: