Skip to main content
All Publive API requests require authentication via HTTP Basic Auth. Both the Content Delivery Service (CDS) and Content Management Service (CMS) use the same method.

How it works

You authenticate by sending an Authorization header with every request. The value is the word Basic followed by a Base64-encoded string of your API Key and API Secret joined by a colon.
Authorization: Basic <BASE64_AUTH_TOKEN>

Generate your token

Encode your credentials using the command line:
echo -n 'YOUR_API_KEY:YOUR_API_SECRET' | base64
This outputs a token like <BASE64_AUTH_TOKEN>. Use this value in your requests.
You can also try API calls directly from these docs — the interactive playground on every API page lets you enter your API Key and API Secret, and it constructs the Authorization header for you automatically.

Example request

curl -X GET \
  'https://cds.thepublive.com/publisher/<PUBLISHER_ID>/posts/' \
  -H 'Authorization: Basic <BASE64_AUTH_TOKEN>'
For CMS API requests that send data, also include the Content-Type header:
curl -X POST \
  'https://cms.thepublive.com/publisher/<PUBLISHER_ID>/category/' \
  -H 'Authorization: Basic <BASE64_AUTH_TOKEN>' \
  -H 'Content-Type: application/json' \
  -d '{"name": "Technology", "english_name": "Technology"}'

Getting your credentials

  1. Log in to your Publive Dashboard.
  2. Click the View API credentials button.
  3. Your API Key is the username for Basic Auth.
  4. Your API Secret is the password for Basic Auth.
  5. Your Publisher ID is visible in your dashboard URL.
If you don’t have login credentials for the dashboard, please contact us at thepublive.com/contact-us.

Authentication errors

If authentication fails, the API returns a 401 Unauthorized response:
{
  "detail": "Invalid Auth Credentials"
}
Common causes:
  • Missing Authorization header
  • Incorrectly encoded Base64 token
  • Invalid or expired API credentials
Security best practices:
  • Never expose API credentials in client-side JavaScript
  • Use environment variables to store credentials
  • Rotate API keys periodically
  • Use the CDS API (read-only) for public-facing applications and reserve CMS API access for server-side operations

Publisher ID

Every API endpoint requires your <PUBLISHER_ID> in the URL path:
https://cds.thepublive.com/publisher/<PUBLISHER_ID>/posts/
https://cms.thepublive.com/publisher/<PUBLISHER_ID>/post/
Your Publisher ID is a unique numeric identifier assigned to your organization. You can find it in your Publive Dashboard URL.