Authentication
The MentionMarket API uses API keys to authenticate requests. You can generate an API key from your dashboard or by calling thegenerateApiKey Firebase function.
API Keys
API keys are used to authenticate all requests to the MentionMarket API. Include your API key in the request URL as a query parameter.Generating an API Key
You can generate an API key in two ways:From the Dashboard
From the Dashboard
- Log in to your MentionMarket account
- Navigate to the API Settings section
- Click Generate New API Key
- Copy and securely store your new key
Programmatically
Programmatically
Call the
generateApiKey Firebase Cloud Function:Rate Limits
API keys are rate limited to 100 requests per hour. If you exceed this limit, you will receive a
429 Too Many Requests response.Using Your API Key
Include your API key in all API requests as a query parameter:Security Best Practices
Follow these best practices to keep your API keys secure:Use Environment Variables
Store API keys in environment variables, never in your code
Rotate Keys Regularly
Generate new keys periodically and revoke old ones
Separate Environments
Use different keys for development, staging, and production
Monitor Usage
Track your API usage to detect unauthorized access
Example: Using Environment Variables
Error Responses
Invalid or missing API key
Rate limit exceeded (100 requests/hour)
API key has been revoked or disabled