Overview
The Cometly API uses API keys to authenticate requests. You can view and manage your API keys in the Cometly Dashboard.API Key Authentication
All API requests must include your API key in the request headers. Your API keys carry many privileges, so be sure to keep them secure. Do not share your secret API keys in publicly accessible areas such as GitHub, client-side code, etc.Authentication Header
Include your API key in theAuthorization header using the Bearer authentication scheme:
Required Headers
All API requests must include the following headers:- Authorization: Your API key using Bearer authentication scheme
- Accept:
application/json- Indicates that you expect JSON responses - Content-Type:
application/json- Specifies that you’re sending JSON data
Example Request
Here’s an example of an authenticated request:Getting Your API Key
1
Log in to your Cometly account
Navigate to app.cometly.com and log in.
2
Go to Integrations
Navigate to the Integrations page at app.cometly.com/integrations.
3
Search for Cometly API
Use the search bar to find “cometly api” and click on the Cometly API integration page.
4
Generate a new API key
Click the button to generate a new API key. Make sure to copy and save it immediately, as you won’t be able to view it again.
Error Responses
If authentication fails, you’ll receive one of the following error responses:| Status Code | Error | Description |
|---|---|---|
| 401 | Unauthenticated | Missing or invalid API key |
| 403 | Forbidden | API key doesn’t have permission for this resource, or your Cometly subscription is inactive |