Authentication
Learn about authentication methods for the Status Check API.
Authentication Methods
Status Check supports two authentication methods:
1. API Key (Recommended)
The primary authentication method for API access.
How to use:
curl -X POST https://api.status-check.io/v1/check \
-H "X-API-Key: sk_your_api_key" \
-H "Content-Type: application/json" \
-d '{"domain": "example.com"}'
Benefits:
- Simple to implement
- No token expiration
- Easy to rotate
- Per-application isolation
See the API Keys guide for detailed information.
2. OAuth Bearer Token
Use your Firebase authentication token for dashboard-related operations.
How to use:
curl -X GET https://api.status-check.io/v1/leads \
-H "Authorization: Bearer your_firebase_token"
When to use:
- Building custom dashboards
- Integrating with user authentication
- Server-to-server with Firebase
Security Best Practices
- Never expose credentials in client-side code
- Use environment variables to store API keys
- Implement key rotation regularly
- Monitor usage for suspicious activity
- Use HTTPS only for all API requests
Common Errors
Invalid API Key
Error:
{
"error": "Invalid API key",
"message": "The provided API key is invalid or has been revoked."
}
HTTP Status: 401 Unauthorized
Solution: Verify your API key and ensure it hasn't been revoked.
Missing Authentication
Error:
{
"error": "Missing authentication",
"message": "No API key provided in request."
}
HTTP Status: 401 Unauthorized
Solution: Include the X-API-Key header in your request.
Next Steps
- API Keys - Comprehensive API key guide
- Rate Limiting - Understanding rate limits
- API Reference - Complete API documentation
Support
Authentication issues? Contact support@status-check.io