Skip to main content
The base URL to send all API requests is https://betaapi.audiohook.com/v2/companies/:companyUUID. HTTPS is required for all API requests.The Audiohook API follows RESTful conventions when possible, with most operations performed via GET, POST, PATCH, and DELETE. Response bodies are encoded as JSON.

Authorization

The API uses token-based authentication.
Users need to sign in at https://app.audiohook.com/login to get a valid JWT token, which is then passed to the API in the Authorization header.
Send the JWT token in the Authorization header of all your requests:
Authorization: Bearer $JWT_TOKEN
To use client ID and secret:
  • Send a POST request to /get-token
  • Receive a JWT token valid for 1 hour
  • Use it in Authorization header

Authenticate

Request Example

curl -X POST https://betaapi.audiohook.com/v2/authenticate \
  -H "Authorization: Bearer ${API_TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{
    "request_headers": [
      {
        "name": "X-Request-Header",
        "value": "Header value"
      }
    ],
    "body": {
      "token": "zsZymXaVNJmOlaNfZVuZhltSqPMEy-YcDcdLf48tRFNJ",
      "type": "oauth"
    }
  }'

Response Sample

{
  "Message": "",
  "type": "success",
  "_token": "eyJhbGciOiJSUzI1NiIsImtpZCI6Imp3ay10ZXN0L...",
  "user": {
    "name": {
      "first_name": "",
      "middle_name": "",
      "last_name": ""
    },
    "user_id": "user-live-404decf62",
    "emails": [
      {
        "email": "[email protected]",
        "verified": true
      }
    ],
    "providers": [
      {
        "provider_type": "Google",
        "profile_picture_url": "https://lh3.googleusercontent.com/a/..."
      }
    ],
    "created_at": "2023-03-16T20:48:41+00:00",
    "status": "active"
  }
}
🔁 POST /v2/authenticate returns user data and a valid token.