OwnMediaHostDocs
API reference

Authentication

Use scoped API keys for integrations and session tokens for the dashboard.

Keep integration keys on your server.Run privileged requests in trusted server code. Do not bundle a long-lived API key in a public frontend. Browser examples illustrate request structure only.

OwnMediaHost supports two authentication methods:

Pass your API key in the X-API-Key request header:

bash
curl -H "X-API-Key: YOUR_API_KEY" \
  https://api.example.com/api/v1/files

Generate API keys from the API Keys page in the dashboard. Each key can be scoped with specific permissions:

PermissionDescription
files.readList and download files
files.writeUpload, update, and delete files
folders.readList folders
folders.writeCreate, update, and delete folders
aliases.readList vanity aliases
aliases.writeCreate and delete aliases
keys.readList API keys
keys.writeCreate and revoke API keys
settings.readRead platform settings
settings.writeModify platform settings

2. Session Token (Dashboard login)

For the web dashboard, authenticate via email/password login:

bash
curl -X POST https://api.example.com/api/v1/auth/login \
  -H "Content-Type: application/json" \
  -d '{"email": "[email protected]", "password": "yourpassword"}'

Response:

json
{
  "success": true,
  "data": {
    "user": { "id": "usr_abc", "email": "[email protected]" },
    "token": "eyJhbGciOiJIUzI1NiIs..."
  }
}

Use the returned token in subsequent requests:

bash
curl -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIs..." \
  https://api.example.com/api/v1/files

Based on the supplied platform and API documentation. View project source ↗