Getting Your API Key
- Sign in to the TapKit Dashboard
- Navigate to Settings > API Keys
- Click Create API Key
- Copy your key and store it securely
Using Your API Key
With the Python SDK
The SDK looks for your API key in this order:- Explicit parameter - Passed directly to the client
- Environment variable -
TAPKIT_API_KEY
With the REST API
Include your API key in theX-API-Key header:
API Key Format
TapKit API keys follow this format:TK_ followed by a random string.
Best Practices
Use environment variables
Use environment variables
Store your API key in an environment variable rather than hardcoding it:Your code stays clean and your key stays secure:
Rotate keys periodically
Rotate keys periodically
Create new API keys periodically and revoke old ones. This limits the impact if a key is compromised.
Use separate keys for different environments
Use separate keys for different environments
Create separate API keys for development, staging, and production. This makes it easier to revoke access without affecting other environments.
Revoking API Keys
If you believe an API key has been compromised:- Go to the TapKit Dashboard
- Navigate to Settings > API Keys
- Find the compromised key and click Revoke
- Create a new API key and update your applications
Error Responses
If authentication fails, you’ll receive a401 Unauthorized response:
- The API key is incorrect or malformed
- The API key has been revoked
- The
X-API-Keyheader is missing