DocumentationAuthentication

Authentication

v1

Scoped bearer keys, separate test and live environments, and credentials that stay on your server.

OAuth for agents and the CLI

MCP clients and the CLI use browser sign-in with authorization-code + PKCE. Inspect the unverified app name, callback origin, workspace, mode and requested permissions. Read scopes start selected; write permissions require your explicit choice. Test is the default unless the client explicitly requested Live.

A grant stays bound to its workspace, mode, resource and selected scopes. Access tokens expire, refresh tokens rotate, and Developers → Agents lets you revoke the whole grant. OAuth never exposes platform credentials or creates API keys.

Bearer keys

Send your key in the Authorization header on every request. Keys belong to a single workspace and environment. Keys are displayed once, stored as hashes, and can be revoked from Developers.

HTTP
Authorization: Bearer cr_test_your_key
PrefixEnvironmentBehavior
cr_test_TestSimulated accounts and publishing. No live social post.
cr_live_LiveReal connected accounts. Platform permissions and approvals apply.

Choose the smallest useful scope

ScopeAllows
accounts:readList connected accounts, capabilities, Pinterest boards/sections and connection-session status
accounts:writeCreate test accounts, assign profiles, manage connection sessions, record explicit YouTube analytics privacy acceptance and disconnect accounts
posts:readList and retrieve posts
posts:writeCreate and cancel posts
comments:readList supported post comments
comments:writeReply to supported comments
webhooks:readInspect endpoints and deliveries
webhooks:writeCreate and disable webhook endpoints
logs:readInspect API request logs
profiles:readList and inspect customer profiles
profiles:writeCreate, edit and delete profiles
media:readList private assets and inspect previews
media:writeUpload, complete and delete media
analytics:readRead cached performance metrics
analytics:writeRefresh post metrics
usage:readRead OAuth grant usage; API keys have implicit access

Every active API key can read its own plan usage with GET /usage; no additional scope is needed. OAuth grants require usage:read for the same operation. See Plans and limits.

Keep secrets on your server

Never put keys in browser code, mobile bundles, screenshots, or public repositories. Use separate keys for separate services. Create a replacement before revoking a key used by an active integration.

API keys cannot create other API keys. Key administration requires a signed-in workspace session.