Skip to main content
Plainrouter uses a per-workspace Signals secret for the Signals Conversion API, an account-bound workspace execution token for production MCP tool calls, and a narrowly scoped OAuth management credential for account discovery. Public MCP discovery and the synthetic MCP sandbox require no credential. REST, TypeScript, Python, Ruby, Go, and the CLI are six interfaces to the same Conversion API and all use the same Signals workspace secret.

Which credential should I use?

These credentials are not interchangeable. The Conversion API rejects workspace execution tokens and OAuth management credentials. MCP rejects Signals workspace secrets and OAuth management credentials.
Never paste any Plainrouter credential into an agent prompt. Inject credentials through your server-side secret manager or the client’s protected credential configuration.

How do I authenticate the REST API?

Send the Signals workspace secret as a bearer token to the server-side Conversion API at https://plainrouter.com/api/v1:
PLAINROUTER_TOKEN must contain the Signals workspace secret. A missing or invalid secret returns HTTP 401.

How do I authenticate the TypeScript SDK?

Install @plainrouter/sdk@0.5.1, then configure the generated client explicitly:
The TypeScript SDK does not read environment variables automatically. Your server must pass the Signals workspace secret through signalTrackerSecret. The property keeps its pre-collapse name for compatibility.

How do I authenticate the Python SDK?

Install plainrouter==0.5.2, then create a client with the Signals workspace secret:
The Python SDK requires Python 3.11 or newer. Each operation module also exposes an asynchronous asyncio method.

How do I authenticate the Ruby SDK?

Install plainrouter-sdk 0.1.1, then create a client with the Signals workspace secret:
The Ruby SDK requires Ruby 3.2 or newer. The client sends the supplied tracker secret as a bearer token and does not read environment variables automatically.

How do I authenticate the Go SDK?

Install github.com/plainrouter/sdk-go@v0.5.2, create the generated client, and attach the Signals workspace secret to the request context:
The Go SDK requires Go 1.23 or newer. Keep the Signals workspace secret in server-side credential storage.

How do I authenticate the CLI?

The CLI uses the same Signals workspace secret. Current 0.5.x builds call it a tracker token in prompts for compatibility. Store it through the hidden login prompt for an interactive workstation:
For CI or an ephemeral shell, inject PLAINROUTER_TOKEN through the job’s secret manager before running the command. The CLI does not expose a --token option. An environment token takes precedence over the locally stored token.

How do I try MCP without a credential?

Connect an MCP client to the synthetic test endpoint:
It exposes get_account_state, get_signal_health, get_performance, and validate_sandbox_event. Every response is synthetic and marked with "sandbox": true. The endpoint reads no tenant data, persists nothing, and contacts no advertising provider. The production endpoint also permits anonymous protocol discovery, tool and resource listing, and reads of static ui:// app shells. Every production tool call and every account-data read still requires an account-bound workspace execution token.

How do I authenticate Plainrouter MCP?

Configure an MCP-compatible client with these exact connection values: A workspace owner issues the token from API in the dashboard for one workspace, one active Meta ad account, one Read, Write, or Admin tier, and a 30, 90, or 365 day expiry. Call get_account_state first. Confirm the returned workspace and Meta ad account before calling another tool. Tool arguments cannot override the account stored with the token.
A Write or Admin token can submit governed proposals, but it does not bypass policy, human approval, provider verification, or account restrictions. A proposal-producing MCP request is not a direct Meta write.

How do I use an OAuth management credential?

An OAuth management credential has one documented agent-facing use:
The route returns the approved read-only account-discovery context. The same credential cannot call MCP tools, Launcher imports, or other agent-authenticated routes. Use a separately issued workspace execution token for MCP after discovery.

Why does a dashboard URL reject my bearer token?

Dashboard settings and approval pages require a signed-in browser session. A valid workspace execution token or OAuth management credential cannot replace that session, even with an active grant or Admin tier. If an automation receives 401 on a dashboard URL, check the requested interface before rotating credentials. Use the documented MCP or API operation with its matching credential, or sign in to complete the interactive action. For grant management, follow the dashboard revocation steps or the separately authorized revoke_grant MCP tool.

Which clients are available?

The REST contract and all four SDKs expose the signed Conversion API operations. The PyPI and npm CLI distributions expose nine commands and do not include an ingestion-verification command. Use REST, an SDK, or MCP for ingestion verification.

Which credentials must not be confused?

  • A Signals workspace secret cannot authenticate MCP.
  • A workspace execution token cannot authenticate the Conversion API.
  • An OAuth management credential cannot authenticate MCP.
  • A browser session cannot replace an API or MCP bearer credential.
  • A same-origin Path B forwarding secret authenticates generated forwarding infrastructure only. It is not an API, SDK, CLI, or MCP credential.
  • Meta access tokens remain on the Plainrouter server. Do not place a Meta token in a Plainrouter client configuration.
For complete request and response fields, use the Conversion API reference. For token tiers and lifecycle, use Workspace tokens. For available agent tools, use the MCP tool reference. For machine discovery, start with the API resource index or the RFC 9727 API catalog.