Authentication
To use the Taskhook API, you'll need an API key to authenticate your requests. You can obtain your API key from the Taskhook dashboard under API Settings. Never share your API key or expose it in client-side code or public repositories.
Using an SDK
If you're using one of our SDKs, simply provide your API key when initializing the client. The SDK will handle authentication automatically.
Authentication Methods
Taskhook supports two ways to authenticate your requests:
Authorization Header (Recommended)
Include your API key in the Authorization
header using the Bearer scheme:
Example request with Authorization header
curl https://api.taskhook.io/v1/tasks \
-H "Authorization: Bearer your_api_key"
Query Parameter
For environments where setting headers isn't possible, you can pass your API key as a query parameter:
Example request with query parameter
curl https://api.taskhook.io/v1/tasks?api_key=your_api_key
Security Considerations
- Keep your API key secure and never expose it in public repositories (e.g., GitHub) or client-side code (e.g., client-side JavaScript)
- Rotate your API key immediately if you suspect it has been compromised
- Use environment variables or a secure credential management service to store your API key in your applications
- Use different API keys for development and production environments