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 allow you to read/write information for specific projects.
Project tokens have three scope options: Status, Read Only, and Admin.
- Status tokens grant read access to the project’s build statuses. Useful for embedding status badges.
- Read Only tokens grant read only access to the project’s API.
- Admin tokens grant read and write access for the project’s API.
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: