Authentication
Every Publer API request must include a valid API key. This guide shows you how to obtain, use, and manage your keys securely.
Obtaining an API Key
Sign in to your Publer account (Ambassador or Enterprise plan).
Navigate to Settings → Access & Login → API Keys.
Click Create API Key.
Enter a descriptive name for your key.
Select only the scopes your integration needs (e.g.,
posts
,media
,accounts
).Click Create.
Copy and securely store the key — you won’t see it again.
Using Your API Key
Include your key in the Authorization
header for every request. Also provide your workspace ID:
Example (list posts):
API Key Scopes
When creating an API key, you must select specific permission scopes based on your integration needs:
Scope
Description
Example Endpoints
users
Manage users and user settings
/users/me
posts
Create and read posts
/posts
media
Upload and manage media assets
/media
workspaces
Retrieve user's workspaces
/workspaces
accounts
Retrieve user's accounts of selected workspace
/accounts
job_status
Retrieve submitted post/media request status
/job_status
locations
Search Facebook/Instagram locations.
/locations
Common Authentication Errors
401 Unauthorized • Missing or invalid
Authorization
header • Key revoked or expired403 Forbidden • Insufficient scopes for the endpoint • Missing
Publer-Workspace-Id
header
Always inspect the JSON error response for message
and code
.
Security Best Practices
Environment Variables Store your key outside code—e.g., in a
.env
file:Secrets Management Use a vault (AWS Secrets Manager, Azure Key Vault, HashiCorp Vault).
Key Rotation Rotate keys every 90–180 days, or after team changes/incidents.
Least Privilege Create separate keys for different use cases.
Safe Logging Never log full keys; mask all but the last 4 characters:
Always HTTPS Never send keys over plain HTTP.
Troubleshooting
If you continue to see authentication errors:
Confirm your key is active and not expired.
Verify you have the correct header names and values.
Double-check that your key has the required scopes.
Contact [email protected] for assistance.
Related Documentation
Last updated
Was this helpful?