Skip to content
Reading with an AI assistant?View as MarkdownOpen in ClaudeOpen in ChatGPT

Get started

OAuth 2.1 social API authentication and API keys

Updated

OAuth 2.1 social API authentication sends one secret in the Authorization: Bearer header: an API key for your own server-side code, or an OAuth 2.1 token with PKCE for an app or AI agent acting for a user.

Browse docs

Credential types#

Credential types
CredentialUse it forWorks onScopes come from
API keyYour own scripts and servers, including a read-only dashboard with .read scopesREST API (/v1) onlyThe scopes ticked when the key is created
OAuth token (PKCE)An app that many SkedCast customers connect to, a browser or mobile app with no server of its own, an AI agent acting in a customer's workspaceREST API and MCP, for the resource it was issued forThe scope parameter, narrowed to the person's access

Both go in the same `Authorization: Bearer` header and SkedCast tells them apart by the value. A key or token never exceeds its owning member's access. API access depends on the plan; see the pricing page.

Diagram: a client picks a credential, an API key for its own server or an OAuth token for a user, sends it as a Bearer header, and SkedCast checks the scopes against the owning member's access before answering.
One Bearer header, two ways to get the secret.

API keys#

An API key is a long-lived credential created in Settings → Developer (Owner or Manager). Its power is its scopes ∩ the owning member's access. Keys work on the REST API only; the MCP server accepts OAuth tokens.

Key settings#

Key settings
SettingValue
Expiry90 days by default; any whole number from 1 to 365
Write limitOptional, 1 to 100,000 requests a minute; it can only lower the plan budget
ManagementCreated, rotated and revoked in the console; there is no API for managing keys
Raw valueShown once, at creation; SkedCast stores only a hash
http
GET /v1/agency HTTP/1.1
Host: api.skedcast.com
Authorization: Bearer sked_live_AB12…
Send the key as a Bearer token on every request.

Handle an API key safely#

RFC 6750 calls a bearer token one that any party in possession of it can use, so it must be protected in storage and in transport (IETF RFC 6750, read 22 November 2026).

  • Keep the key in a server secret store or environment variable, never in code, a browser bundle, a mobile app or a public repo.
  • Send it only over HTTPS and only in the Authorization header. A URL lands in logs, history and referrers, so never put a key in a query string.
  • Create one key per integration, named for its job, and revoke it when the job is retired.
  • Choose the shortest lifetime you can live with. An expired key stops working and cannot be rotated: create a new one.
  • Rotate on a schedule and whenever a key may have been seen. Rotation keeps the name, scopes and original expiry and replaces only the secret, so it does not extend a key's life.
  • SkedCast asks you to confirm your sign-in again before it rotates a key.
  • If a key leaks, rotate it: Settings → Developer → Rotate. The old secret stops working immediately.

Narrow a key's scopes#

Tightening a running integration needs no downtime. Rotation swaps a secret but keeps the scopes, so rotation alone narrows nothing.

  • List the calls the integration makes, from its logs, and mark the scope each needs (scopes).
  • Create a second key with only those scopes and its own name.
  • Switch the integration to it and watch for 403 insufficient_scope; if one appears, add that scope and nothing else.
  • Revoke the old key once the integration has run cleanly on the new one.

Credential lifetimes#

Credential lifetimes
CredentialLifetimeHow it renewsHow it ends early
API key90 days by default, 1 to 365 daysCreate a new key, or rotate: the expiry date stays the sameRevoke or rotate in Settings → Developer
OAuth authorization code10 minutesNot renewable: exchange it once at /oauth/tokenExpires unused
OAuth access token15 minutesRefresh with the refresh tokenExpires on its own, and the next refresh checks the person's current access again
OAuth refresh token30 daysRotates on every use: store the newest onePOST /oauth/revoke ends it and its whole rotation chain

Lifetimes are the values the API applies today. A short access token limits what a stolen one is worth.

OAuth 2.1 social API authentication#

Use the OAuth 2.1 authorization code flow with PKCE (S256 only) when an app or AI agent acts for a user. Clients register dynamically (RFC 7591) or use a Client ID Metadata Document as client_id.

Access tokens are audience-bound (RFC 8707) and refresh tokens rotate on every use. The OAuth guide lists the endpoints, the resource values and each step with code.

Authentication errors#

Every error is an RFC 9457 problem document with a stable code; conventions lists the format and the error catalogue every code.

Table
AnswerMeaningWhat to do
401 with WWW-Authenticate: Bearer error="invalid_token"The credential is missing, wrong, expired or revokedUse a new key, or refresh the OAuth token; if the refresh fails, send the person through consent again
403 insufficient_scopeThe credential is valid but lacks a scope; the scope attribute names itCreate a key that holds that scope, or request it in a new consent
403 rbac_permission_denied or rbac_scope_deniedThe member who owns the credential lacks the access, or the request names a client they cannot reachDo not retry with more scopes: give the member access or change the request
403 step_up_requiredThe action, such as rotating a key, needs a fresh confirmation of the sign-inConfirm your sign-in in the console and try again
429A request budget ran outWait for Retry-After, then retry
An API key sent to the MCP serverThe MCP server refuses it: it accepts OAuth tokens, not API keysSign in with OAuth for MCP; keep the key for /v1
A token for one resource used on the otherThe token is refused: it was issued for the other resourceRequest resource for the surface you call
A key with every scope tickedA leaked key can do everything the member canGrant only the scopes the integration uses

Verify a credential#

Make one read request first: GET /v1/agency needs no write scope and no ids, so it separates a credential problem from a request problem.

  • 200: the key or token is valid, unexpired and allowed to read the workspace.
  • 401: the credential is wrong; WWW-Authenticate says why.
  • 403: the credential is real but lacks something; the error code says whether it is a scope or the member's own access.
bash
curl https://api.skedcast.com/v1/agency \
  -H "Authorization: Bearer <key or access token>"
Call the workspace endpoint with the credential.

Pages for the next job once a credential works.

Sources