Skip to main content
If you are automating your own workspace, use its API key. If you are building a product that other PostQueen users connect to, use OAuth: they approve your app on a PostQueen consent screen, and you get a pos_ token that acts on their workspace. Nobody hands you their API key. A pos_ token works on every public API endpoint, sent the same way as a key: Authorization: pos_..., with no prefix. It also works on the MCP server at https://api.postqueen.ai/mcp, sent there as Authorization: Bearer pos_.... It does not work in the /mcp/YOUR_API_KEY address, which only takes API keys.

How it works

Set it up

1

Create the app

In PostQueen, open Connections > Developers and choose Create OAuth App. Fill in:You get a Client ID (pca_...) and a Client Secret (pcs_...). A workspace has one OAuth app, and only a workspace Admin or Super Admin can create, edit or delete it.
The Client Secret is shown once. Copy it and keep it on your server. If you lose it, choose Rotate Secret.
2

Send people to the consent screen

The person signs in if they need to, sees your app’s name, description and picture, and chooses Authorize or Deny.
Only a workspace Admin or Super Admin can authorize an app. The token acts with full rights on the workspace, like its API key, so a regular member cannot hand one out.
3

Take the code from the callback

PostQueen redirects to your Redirect URL:
Check that state is the value you sent. If the person chose Deny, the callback carries error=access_denied instead of a code. The code works once, for 10 minutes.
4

Exchange the code for a token

From your server:
You can also send the Client ID and Secret as HTTP Basic credentials in Authorization and leave them out of the body. The answer is 201:
id is the workspace the person approved your app for. Store access_token; the code is spent. Every field: Get an access token.
5

Call the API

A list of the person’s channels means the token works. From here every endpoint in this reference is open to your app.

How long a token lasts

The token has no expiry date. It stops working when:
  • the person revokes your app under Connections > Approved Apps;
  • the person who approved it is removed from the workspace, disabled, or deletes their account;
  • the same person approves your app again in the same workspace: the new token replaces the old one;
  • you delete your app.
Rotate Secret replaces the Client Secret at once, so token requests with the old secret fail, but tokens already issued keep working. Delete App revokes every token your app holds; it cannot be undone.

Clients that register themselves

MCP clients and other tools can register without anyone creating an app: POST https://api.postqueen.ai/oauth/register (Dynamic Client Registration, RFC 7591) takes no API key.
A registered client gets a pcd_ Client ID and differs from an app made under Developers: A registered client that nobody has approved after 30 days may be removed. The answer carries client_id, client_secret (only for a client with a secret, shown once), redirect_uris, token_endpoint_auth_method, grant_types: ["authorization_code"] and scope. A callback that breaks the rules answers 400 invalid_redirect_uri.

Full example (Node.js)

Errors

Next steps

Check an authorization request

The call behind the consent screen, useful to test a Client ID.

Get an access token

The token request, field by field.

List channels

The first call most apps make with a new token.

Limits and errors

The hourly limits and every status code.
Last modified on September 23, 2026