Skip to content

Error Codes

Complete reference of API error codes and their meanings.

HTTP Status Codes

CodeNameDescription
200OKRequest successful
201CreatedResource created successfully
400Bad RequestInvalid request parameters
401UnauthorizedMissing or invalid authentication
403ForbiddenNo permission to access resource
404Not FoundResource does not exist
409ConflictResource already exists
422Unprocessable EntityValidation failed
429Too Many RequestsRate limit exceeded
500Internal Server ErrorServer error

Error Response Format

json
{
  "statusCode": 400,
  "message": "Validation failed",
  "error": "Bad Request",
  "details": [
    {
      "field": "name",
      "message": "name must be a string"
    }
  ]
}

Authentication Errors

401 - Invalid API Key

json
{
  "statusCode": 401,
  "message": "Invalid API Key",
  "error": "Unauthorized"
}

Causes:

  • API Key is incorrect
  • API Key header name is wrong
  • API Key has been revoked

Solution: Verify API Key and header name (ls-api-key)

403 - Access Denied

json
{
  "statusCode": 403,
  "message": "Access denied to this resource",
  "error": "Forbidden"
}

Causes:

  • API Key doesn't have access to the project
  • Trying to access another project's resources

Solution: Verify project ID matches your API Key

Validation Errors

400 - Missing Required Field

json
{
  "statusCode": 400,
  "message": "name is required",
  "error": "Bad Request"
}

Solution: Include all required fields in request body

400 - Invalid UUID

json
{
  "statusCode": 400,
  "message": "projectId must be a valid UUID",
  "error": "Bad Request"
}

Solution: Use valid UUID format for IDs

Resource Errors

404 - Livestream Not Found

json
{
  "statusCode": 404,
  "message": "Livestream not found",
  "error": "Not Found"
}

Causes:

  • Livestream ID is incorrect
  • Livestream was deleted
  • Livestream belongs to different project

404 - Media Server Not Found

json
{
  "statusCode": 404,
  "message": "Media server not found",
  "error": "Not Found"
}

Solution: Get available servers from /media-servers/available

Stream Errors

Push Token Errors

ErrorDescriptionSolution
INVALID_PUSH_TOKENToken is malformedGenerate new token
EXPIRED_PUSH_TOKENToken has expiredGenerate new token with longer expiry
TOKEN_MISMATCHToken doesn't match streamUse correct stream key

Stream Status Errors

StatusDescription
READY_FOR_USEStream created, waiting for broadcaster
STARTEDStream is live
ENDEDStream has ended
TOKEN_EXPIREDPush token expired during stream

Rate Limiting

429 - Too Many Requests

json
{
  "statusCode": 429,
  "message": "Rate limit exceeded",
  "error": "Too Many Requests",
  "retryAfter": 60
}

Solution: Wait for retryAfter seconds before retrying

Endpoint TypeLimit
Livestream CRUD100 req/min
Public APIs1000 req/min

Released under the MIT License.