Skip to main content

OAuth 2.0

Caledee supports the OAuth 2.0 Authorization Code flow with PKCE so third-party applications can access user data with explicit consent.

Issuing and using OAuth tokens is part of the Team plan. Create an app at Settings → Developers.

Endpoints

EndpointMethodDescription
/oauth/authorizeGETAuthorization + consent screen
/oauth/tokenPOSTExchange code for tokens / refresh
/oauth/revokePOSTRevoke a token (RFC 7009)
/oauth/userinfoGETOpenID Connect user profile

Authorization flow

  1. Redirect the user to /oauth/authorize with your client_id, redirect_uri, scope, state, and PKCE code_challenge.
  2. The user sees a consent screen showing your app name and requested permissions.
  3. On approval, Caledee redirects back to your redirect_uri with a short-lived code.
  4. Exchange the code at POST /oauth/token with your code_verifier (PKCE) to get an access token + refresh token.
  5. Use the access token as a Bearer token in API requests.

Scopes

ScopeDescription
read:profileView name, email, timezone
read:bookingsList and view bookings
write:bookingsCreate, cancel, reschedule bookings
read:event-typesList and view event types
write:event-typesCreate and edit event types
read:availabilityView schedules and rules
write:availabilityEdit schedules and block dates

Token lifecycle

  • Access token: 1 hour TTL. Use as Authorization: Bearer <token>.
  • Refresh token: 30 days TTL. Use grant_type=refresh_token at /oauth/token to get a new pair.
  • Refresh rotates both tokens — the old pair is revoked.

PKCE (required for public clients)

Public clients (SPAs, mobile apps, Claude Desktop) must use PKCE with the S256 method. Generate a random code_verifier, compute code_challenge = base64url(sha256(verifier)), and include both in the flow.

Error responses

Token endpoint errors follow RFC 6749 §5.2: {"error": "invalid_grant"} with standard error codes (invalid_request, invalid_client, invalid_grant,unsupported_grant_type).

OAuth 2.0 — Caledee Developer Docs · Caledee