How to create an API token

This article is possibly outdated. Please check the latest support articles for more information.

Instructions on how to create an API token

Choose "API Tokens", under API Tools in the left-hand navigation in Control Center. The first time you create a token you will see the screen below.

Create Token on API Clients Screen
Shows the option to create a token highlighted

Enter the name for your token and click "Create Token".

Optional: Select which scopes the token will have access to. If unsure leave all scopes enabled. To use the events API, your token will need to have the "Events" scope. The other scopes determine what other APIs the token has access to.

In the next screen choose "Copy Token". This copies the token to the clipboard. You can now paste it into another application.

Save Token Screen

Remember: You MUST save the token somewhere such as in a password manager, as you won't be able to see it again.

Now that you have an API token, you can call the API. See PredictHQ Technical documentation for more details.

In the guides where you "see Authorization: Bearer $ACCESS_TOKEN" replace $ACCESS_TOKEN with your token. For example, see our API quick start guide.

You can also use the API Explorer feature of Control Center to explore the capabilities of the API.

Viewing a list of Tokens

Once you've created a token you will see the screen below that lists shows a list of tokens. From this screen, you can delete tokens, view token scopes, and edit the token name.

List of tokens
  • To delete click on the delete icon

  • To edit a tokens name click on the edit icon

  • To create another token click on "Create New Token"

Where did my API Clients go?

We previously supported the concept of API Clients. These were removed in July 2024. We found that API Clients weren't being used, weren't necessary for using PredictHQ's APIs, and added complexity to the process of creating a token.

For users who previously created API clients, these will be listed in the tokens screen. In the name of each token if the token was created before the change to remove the API Clients option then the API Client name displays in the token name field. The API Client displays in a regular font before the "|" character. Then the API Token name displays in the 2nd part of the API Token name field after the "|" character. Like this:

API Client name | API Token name

The API Clients are still present in the database. Please contact us if you have any issues with this change to remove API Clients.