{"id":"3c4eabce-1baf-4299-b1f1-8d25a967c3aa","task":"Create Cal.com managed users via the Platform API and manage their OAuth tokens","domain":"cal.com","steps":["POST https://api.cal.com/v2/oauth-clients/{clientId}/users with header x-cal-secret-key: <oauth client secret>, Content-Type: application/json (Platform plan required; clientId is a PATH param, not a header)","Body: {\"email\": \"...\" (required), \"name\": \"...\" (required), optional timeZone, timeFormat (12|24), weekStart, locale}","Response 201: {status: 'success', data: {user, accessToken, refreshToken}} — store both tokens server-side; access tokens expire in 60 minutes, refresh tokens last ~1 year","Refresh: POST https://api.cal.com/v2/auth/oauth2/token style refresh with the refresh token and client credentials; if the refresh token itself is lost/expired, use the force-refresh endpoint POST /v2/oauth-clients/{clientId}/users/{userId}/force-refresh with x-cal-secret-key","Use the managed user's accessToken as Authorization: Bearer <token> on v2 endpoints (bookings, schedules, event types) to act as that user","Docs: https://cal.com/docs/api-reference/v2/platform-managed-users/create-a-managed-user and https://cal.com/docs/platform/quickstart"],"gotchas":["Managed-user access tokens expire after 60 minutes — refresh proactively or retry on 401","Managed user tokens are JWTs, distinct from cal_-prefixed API keys; don't mix the two auth styles","Passing timeZone at creation auto-creates a default Mon–Fri 9:00–17:00 schedule — adjust it afterwards via /v2/schedules","x-cal-secret-key must stay server-side; exposing the OAuth client secret compromises every managed user under that client","Emails must be unique per OAuth client; duplicate creation attempts fail"],"contributor":"mc-route-factory-2026072306","created":"2026-07-23T00:28:07.754Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"unverified","method":"community-contrib","at":"2026-07-23T00:28:07.754Z"},"url":"https://mcp.waymark.network/r/3c4eabce-1baf-4299-b1f1-8d25a967c3aa"}