Authentication Overview
Lunar Stream uses API Key authentication for all partner integrations.
Credentials
As a partner, you will receive from Lunar Stream admin:
| Credential | Description | Format |
|---|---|---|
| API Key | Authentication key for API calls | ls_proj_v1_<random_string> |
| Project ID | Your project identifier | UUID format |
Using API Key
Include the API Key in the ls-api-key header for all API requests:
bash
curl -X GET "https://api.lunarstream.kozow.com/api/v1/livestream?projectId=YOUR_PROJECT_ID" \
-H "ls-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json"Security Best Practices
- Store securely - Use environment variables or secret managers
- Never commit - Add
.envto.gitignore - Server-side only - Never expose API Key in client-side code
- Use HTTPS - All API calls must use HTTPS
Environment Configuration
bash
# .env file
LUNAR_STREAM_API_URL=https://api.lunarstream.kozow.com/api/v1
LUNAR_STREAM_API_KEY=ls_proj_v1_ydi3lLihcIW0Z9ZAkGz2BjV6caLYqzK41TQAGblW-4E
LUNAR_STREAM_PROJECT_ID=ce4b77e3-3ed0-47ee-a307-ade5f3fbef91Error Responses
| Status | Error | Description |
|---|---|---|
| 401 | UNAUTHORIZED | Missing or invalid API Key |
| 403 | FORBIDDEN | API Key doesn't have access to resource |
json
{
"statusCode": 401,
"message": "Invalid API Key",
"error": "Unauthorized"
}Next Steps
- API Key Details - Detailed usage guide
- API Reference - Complete API documentation