Once you've been set up with access to BenchPrep GraphQL API, you also get the ability to generate API tokens for use with our GraphQL API. An API token is like a key; it is required to access BenchPrep GraphQL API. Let's walk through how you can generate those tokens.
Any user with a Console Admin role can view, generate and update tokens. Alternatively, a custom role can be assigned the following permissions:
- Read developer tokens
- Grants a user the ability to read applicable developer_tokens
- Create developer tokens
- Grants a user the ability to create applicable developer_tokens
- Update developer tokens
- Grants a user the ability to update applicable developer_tokens
Before generating a token, note that the permissions of the user that generates it will be forever linked with the token. If, for example, the user who generates it doesn’t have permission to update your learners, the token will never have that permission either. Similarly, if the person who generated the token has their role or permissions removed, the same roles and permissions will be removed from the token.
If you have an Admin role, or a custom role with the above permissions, simply follow these steps:
-
Select Settings in Console
-
Select API Tokens
-
Click Generate token in the top right
-
Enter a token name and click Generate
-
Naming your tokens will help you keep track of them, should you choose to deactivate some later. We advise you choose a name related to its intended use case.
-
You can always edit the name of a token after it has been generated.
-
-
The token will appear, ready to be copied.
-
Note: Once the token is generated and displayed, it will not be displayed again, so select Copy to Clipboard to copy and save it in your own documentation to reference it later. For your own information security, we will not store the token anywhere.
-
For more information on what to do with your token once you have it, take a look at our Getting Started article.