Getting Started
Authentication
Learn how to authenticate with the Quote Gallery API using API keys.
Authentication
The Quote Gallery API uses API keys to authenticate requests. Every request to the API must include a valid API key in the request headers.
Getting Your API Key
- Sign in to your Quote Gallery account
- Navigate to your Dashboard → API Keys
- Click Generate New Key
- Copy your API key and store it securely
Your API key is shown only once when created. Store it in a secure location like an environment variable or a secrets manager. If you lose it, you'll need to generate a new one.
Using Your API Key
Include your API key in the X-API-Key header with every request:
curl -H "X-API-Key: your_api_key_here" \
https://quotegallery.nl/api/v1/quotes
Example in JavaScript
const response = await fetch('https://quotegallery.nl/api/v1/quotes', {
headers: {
'X-API-Key': process.env.QUOTE_GALLERY_API_KEY,
},
})
const data = await response.json()
Example in Python
import requests
import os
response = requests.get(
'https://quotegallery.nl/api/v1/quotes',
headers={'X-API-Key': os.environ['QUOTE_GALLERY_API_KEY']}
)
data = response.json()
Security Best Practices
Environment Variables
recommended
Store your API key in environment variables, never hardcode it in your source code.
Server-side Only
recommended
Only use your API key in server-side code. Never expose it in client-side JavaScript or mobile app bundles.
Key Rotation
recommended
Rotate your API keys periodically. You can generate a new key and revoke the old one from your dashboard.
Error Responses
If authentication fails, the API will return one of the following errors:
| Status Code | Message | Description |
|---|---|---|
401 | Missing API key | No X-API-Key header was provided in the request. |
401 | Invalid API key | The provided API key is not valid or has been revoked. |
429 | Rate limit exceeded | You've exceeded the rate limit for your current tier. |
Example Error Response
{
"error": "Invalid API key",
"status": 401
}
API Tiers
Your API key is associated with a tier that determines your rate limits:
| Tier | Requests / Hour | Price |
|---|---|---|
| Free | 100 | Free |
| Hobby | 500 | €4.99/mo |
| Premium | 2,000 | €14.99/mo |
If you have an active Supporter subscription for the Quote Gallery website, you automatically receive a 25% discount on all paid API tiers.
For more details on rate limits and pricing, see the Rate Limits & Pricing guide.