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.
How to create an API Key and Secret
- Log in to the API Manager.
- Click the Test APIs tile.
- Select a test suite.
- Go to the Settings > API hooks and keys tab.
- To use your new API Hook, you need to ensure you have an API Key and Secret.
- Go to the Keys section and click Add.
- Enter the key name.
- Click Save. The system will display the key and the secret. Copy it for future reference. if your Key and Secret is set up, see Using API Hooks for more information on how to use the API Hook.
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 using this Key and Secret combination.
What to do next
- Next Topic: Using API Hooks