Skip to main content
The PublishBuddy API uses personal access tokens sent as Bearer tokens in the Authorization header. Every endpoint requires authentication — there is no anonymous access.

Generate a token

Tokens are created and managed inside the dashboard, scoped to your user account.
1

Sign in to the dashboard

Go to app.publishbuddy.com and sign in with the account you want the token to act on behalf of. The token will be able to access every workspace that account is a member of, with the same permissions your user has in each workspace.
2

Open User Settings → Login & Security

Click your avatar (top-right), choose User Settings, then open the Login & Security tab. You’ll see a section labelled API tokens.
3

Create a new token

Click Generate API token, give it a descriptive name (for example Zapier integration or Internal CMS sync), select the abilities you want the token to grant, and confirm.
4

Copy the token immediately

The token value is shown once, when it’s created. Copy it into your secret manager, .env file, or wherever your application reads secrets from. You will not be able to view it again — if you lose it, revoke it and create a new one.
Treat tokens like passwords. Anyone with your token can read and modify your workspaces. Never commit them to version control, never paste them in browser screenshots, and rotate them if you suspect they’ve leaked.

Token abilities (scopes)

When you create a token you select one or more abilities. The API rejects any request whose token does not include the ability required by that endpoint. You can think of abilities as a least-privilege control: if a token is only going to publish posts, don’t grant it analytics access. Each endpoint in the API reference documents the ability it requires. A token can hold any combination of abilities.

Use the token

Send it as a Bearer token on every request:

Revoke a token

Revoking is immediate — any in-flight requests with the token will start returning 401 Unauthenticated within seconds.
1

Open Login & Security again

Same place you created the token: User Settings → Login & Security.
2

Click Revoke next to the token

Tokens are listed by name, last-used timestamp, and creation date. Find the one you want to invalidate.
3

Replace it in your applications

Generate a new token (with the same abilities, if you’re just rotating) and redeploy any application that depends on it.

Common authentication errors

See Errors for the full reference.

Best practices

Don’t share one token across Zapier, your internal CMS, and ad-hoc scripts. Issuing a separate token per integration lets you revoke one without breaking the others, and the Last used column in the dashboard tells you which is which.
A token used only for analytics ingestion shouldn’t carry posts or media_contents abilities. Reducing scope reduces blast radius if the token leaks.
Rotate tokens on a schedule (e.g. every 90 days) and immediately whenever a team member who knew the token leaves the organisation.
Never embed a PublishBuddy token in a browser bundle, mobile app, or any client-controlled environment. Tokens are designed for server-to-server use.