Users accessing Crunch via the API may receive a notification that their connection has timed out and to check the progress of their task by following a provided URL. The following steps describe how to set up an API key in your browser if you receive an error message when clicking this URL.
Configuring an API key
To configure an API key:
- Install a browser plugin to modify header requests, such as ModHeader.
- Add an Authorization header with the value as shown below. Type the word Bearer, a blank space, and then your API key. For example:
Bearer apk-abc12d-EF-abcdefg...Check the plugin to make sure the header was only added for requests made to domains ending with “crunch.io”. This is an important step because if this header is sent to other sites, it could pose a security risk to your account. The following steps outline the process in ModHeader. If you are using another browser plugin, the steps may vary.
- In ModHeader, press the + (Add) icon.
- Choose URL filter.
- Add the .*.crunch.io/api filter:
- Exit out of ModHeader.
- Refresh the Crunch API URL that requires a key.
Now that you are sending your key, the API will serve your request.