molroomolroo

Authentication

Set up your API key and authenticate requests to molroo-api.

Authentication

All molroo API endpoints (except /v1/health) require authentication via a Bearer token in the Authorization header.

Getting Your API Key

  1. Sign up at molroo.io
  2. Navigate to the Dashboard and go to API Keys
  3. Click Create New Key
  4. Copy and store your key securely — it will only be shown once

Using Your API Key

Include the key in every request as a Bearer token:

Authorization: Bearer YOUR_API_KEY

curl

curl https://api.molroo.io/v1/health \
  -H "Authorization: Bearer mk_live_abc123def456"

JavaScript

const response = await fetch("https://api.molroo.io/v1/health", {
  headers: {
    Authorization: "Bearer mk_live_abc123def456",
  },
});

Python

import requests
 
response = requests.get(
    "https://api.molroo.io/v1/health",
    headers={"Authorization": "Bearer mk_live_abc123def456"},
)

Key Prefixes

PrefixEnvironmentUsage
mk_live_ProductionLive API calls
mk_test_SandboxDevelopment and testing

Security Best Practices

  • Never expose keys in client-side code. Always call molroo-api from your backend.
  • Use environment variables to store keys — do not hardcode them.
  • Rotate keys periodically from the Dashboard.
  • Use test keys (mk_test_) during development.

Error Responses

If authentication fails, you will receive:

{
  "error": {
    "code": "UNAUTHORIZED",
    "status": 401,
    "message": "Invalid or missing API key"
  }
}

Rate Limits

Rate limits are applied per API key. See the pricing page for details on limits per plan.

PlanRequests/minSessions
Free6010
Pro6001,000
EnterpriseCustomUnlimited

On this page