Skip to content

Authentication Overview

Lunar Stream uses API Key authentication for all partner integrations.

Credentials

As a partner, you will receive from Lunar Stream admin:

CredentialDescriptionFormat
API KeyAuthentication key for API callsls_proj_v1_<random_string>
Project IDYour project identifierUUID 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

  1. Store securely - Use environment variables or secret managers
  2. Never commit - Add .env to .gitignore
  3. Server-side only - Never expose API Key in client-side code
  4. 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-ade5f3fbef91

Error Responses

StatusErrorDescription
401UNAUTHORIZEDMissing or invalid API Key
403FORBIDDENAPI Key doesn't have access to resource
json
{
  "statusCode": 401,
  "message": "Invalid API Key",
  "error": "Unauthorized"
}

Next Steps

Released under the MIT License.