Creating API Keys and Secrets
API Keys and Secrets are the credentials required to use an API Hook. For a request to an API Hook to be authorised, both the X-API-Key
and X-API-Secret
headers must be provided. The values
of the API Key and Secret represent the values of these headers respectively.
Unlike API Hooks which are scoped to a single Test Suite, API Keys and Secrets are scoped to a Test Organization. Therefore, any API Key and Secret pair which is generated within a Test Organization will have permission to authorise requests to all API Hooks within the same organization, regardless of the Test Suite the API Hook is associated with. API Keys and Secrets can only be generated by system administrators or test organization managers.
Creating an API Key and Secret
First navigate to the Test Organization settings page by clicking the Cog icon in the menu bar. Note that you will only see this icon if you are a administrator or a test organization manager.
Within the Test Organization settings page, click the KEYS option under the API Hooks heading in the navigation menu.
Now click on the + API Key button to create a new API Key.
You will then be shown the generated Key and Secret. Make a note of both of these, especially the Secret as this will be the only time this is visible. Give your new API Key a name and then click
the confirm icon to save it.
Your new API Key is now active and will now appear in the list of API Keys in the navigation menu. Clicking on the key will show you the API Key's value should you need to reference this again in the future. If you want to remove the API Key at any point, simply click on the Delete icon next to the API Key you want to remove. This will invalidate all future requests to API Hooks within you Test Organization using this Key and Secret combination.
What to do next
- Next Topic: Using API Hooks