Browse docs
Credential types#
| Credential | Use it for | Works on | Scopes come from |
|---|---|---|---|
| API key | Your own scripts and servers, including a read-only dashboard with .read scopes | REST API (/v1) only | The 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 workspace | REST API and MCP, for the resource it was issued for | The scope parameter, narrowed to the person's access |
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#
| Setting | Value |
|---|---|
| Expiry | 90 days by default; any whole number from 1 to 365 |
| Write limit | Optional, 1 to 100,000 requests a minute; it can only lower the plan budget |
| Management | Created, rotated and revoked in the console; there is no API for managing keys |
| Raw value | Shown once, at creation; SkedCast stores only a hash |
GET /v1/agency HTTP/1.1
Host: api.skedcast.com
Authorization: Bearer sked_live_AB12…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
Authorizationheader. 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 | Lifetime | How it renews | How it ends early |
|---|---|---|---|
| API key | 90 days by default, 1 to 365 days | Create a new key, or rotate: the expiry date stays the same | Revoke or rotate in Settings → Developer |
| OAuth authorization code | 10 minutes | Not renewable: exchange it once at /oauth/token | Expires unused |
| OAuth access token | 15 minutes | Refresh with the refresh token | Expires on its own, and the next refresh checks the person's current access again |
| OAuth refresh token | 30 days | Rotates on every use: store the newest one | POST /oauth/revoke ends it and its whole rotation chain |
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.
| Answer | Meaning | What to do |
|---|---|---|
401 with WWW-Authenticate: Bearer error="invalid_token" | The credential is missing, wrong, expired or revoked | Use a new key, or refresh the OAuth token; if the refresh fails, send the person through consent again |
403 insufficient_scope | The credential is valid but lacks a scope; the scope attribute names it | Create a key that holds that scope, or request it in a new consent |
403 rbac_permission_denied or rbac_scope_denied | The member who owns the credential lacks the access, or the request names a client they cannot reach | Do not retry with more scopes: give the member access or change the request |
403 step_up_required | The action, such as rotating a key, needs a fresh confirmation of the sign-in | Confirm your sign-in in the console and try again |
429 | A request budget ran out | Wait for Retry-After, then retry |
| An API key sent to the MCP server | The MCP server refuses it: it accepts OAuth tokens, not API keys | Sign in with OAuth for MCP; keep the key for /v1 |
| A token for one resource used on the other | The token is refused: it was issued for the other resource | Request resource for the surface you call |
| A key with every scope ticked | A leaked key can do everything the member can | Grant 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-Authenticatesays why.403: the credential is real but lacks something; the errorcodesays whether it is a scope or the member's own access.
curl https://api.skedcast.com/v1/agency \
-H "Authorization: Bearer <key or access token>"Related reference#
Pages for the next job once a credential works.
- Scopes: every scope and what it unlocks.
- OAuth guide: the authorization code flow with working code.
- MCP guide: how an AI agent signs in.
- API reference: every path with its scope.
- Quickstart: a first scheduled post.
- API request builder and TypeScript SDK: try a call, or use generated clients.
- Media uploads, webhooks and partner onboarding.
- Conventions and the API error catalogue.
- OAuth for social media, social media API authentication and the social media API overview.
- Developer documentation and pricing: every other page, and API access by plan.
Sources
- IETF Internet-Draft: The OAuth 2.1 Authorization Framework (draft-ietf-oauth-v2-1-17)
- IETF RFC 9700: Best Current Practice for OAuth 2.0 Security
- IETF RFC 7636: Proof Key for Code Exchange by OAuth Public Clients
- IETF RFC 6750: The OAuth 2.0 Authorization Framework, Bearer Token Usage
- IETF RFC 8707: Resource Indicators for OAuth 2.0
- IETF RFC 9728: OAuth 2.0 Protected Resource Metadata
- IETF RFC 7591: OAuth 2.0 Dynamic Client Registration Protocol
- IETF RFC 7009: OAuth 2.0 Token Revocation
- Model Context Protocol specification 2025-06-18: Authorization