Skip to content

Guides

Social media API authentication: API keys and OAuth 2.1

Every social media API needs a way to prove who's calling and what they're allowed to do. SkedCast has two: an API key (Bearer token) for your own server-side scripts, and OAuth 2.1 with mandatory PKCE for a third-party app or AI agent acting on someone else's workspace.

Browse docs

5 min read

API keys — for your own scripts#

Create one in Settings → Developer (Owner/Manager). It carries a curated set of scopes, and its effective power is always scopes ∩ your role — a key can never do more than the member who owns it could do by hand. Send it as a Bearer token on every request.

http
GET /v1/agency HTTP/1.1
Host: api.skedcast.com
Authorization: Bearer sked_live_AB12…

OAuth 2.1 — for third-party apps and AI agents#

When your app acts on behalf of someone else's SkedCast workspace, use the Authorization Code flow with PKCE (S256 required). Clients register dynamically (RFC 7591) — no manual app-store-style approval step — and every endpoint is discoverable from /.well-known/oauth-authorization-server.

Tokens are audience-bound (RFC 8707): request resource=https://api.skedcast.com/v1 at the authorize step for a REST API token, or omit it for an MCP-only token.

Social media API authentication: which one should I use?#

Use caseUse
A cron job, backend service, or internal tool you ownAPI key
An app other SkedCast users install and authorizeOAuth 2.1
An AI agent (Claude, ChatGPT, a custom agent) acting for a userOAuth 2.1, or an API key if it's your own single-workspace agent
A CI pipeline that publishes on a scheduleAPI key, scoped to just posts.compose
authenticationapi-keysoauth

FAQ

Can I use the same API key from a browser?
No — never embed an API key in a browser, mobile app, or public repo. It grants real access to your workspace and only its SHA-256 hash is stored on SkedCast's side, so it can't be recovered if it leaks — only rotated. Use OAuth 2.1 for anything running in an untrusted client.
How long do OAuth access tokens last?
15 minutes. Use the refresh token (valid 30 days, rotating on every use, reuse-detected per OAuth 2.1 §4.3.1) to get a new one. API keys are long-lived with a mandatory expiry of up to a year.
Is this the same as a social media login API?
Not quite — a social media login API (like "Sign in with X") authenticates a person to your own product. SkedCast's OAuth 2.1 flow instead authorizes a third-party app or AI agent to act on someone else's SkedCast workspace; it's a delegated-access model, not an end-user login button.

Ready to broadcast everywhere?

Sign up free — no credit card. You land on the Free plan, and you can start a one-time 7-day Studio trial from your workspace whenever you are ready. Connect your first accounts, import a batch, and watch one post fan out across every platform.