POST /v1/calendar/connect/{provider}
一度限りの OAuth リダイレクト URL を返します。provider ∈ {google, microsoft}。State が customer_user_id を round-trip。
04 · calendar integration api
V1 は M2 2026 提供Connect your users' Google Calendar or Outlook account once. We sync events, evaluate the rules you defined, and dispatch a recording bot at the right minute. Free — you only pay for the $0.30/hr of recording you actually consume.
概要
これがある理由。Recall の最大の堀は、顧客のエンドユーザーの OAuth トークンを保持しているので、顧客が OAuth を 2 度構築する必要がないことです。我々は M2 でこれを再現します:POST /api/v1/calendar/connect/google と /connect/microsoft が、ユーザーがクリックするリダイレクト URL を返します。成功時、不透明な meetbot_calendar_user_id を返し、それを保存します。リフレッシュトークンは保持し、テナントごとの KMS 由来キーで at rest 暗号化します。
そこから:バックグラウンドジョブが接続済みユーザーごとに 5 分ごとに Google Calendar Events API と MS Graph /me/events をポーリングし、iCalUid で重複排除し、録画ルールを評価します。ルールは JSON:「すべての社内ミーティングを録画」「マネージャーとの 1:1 をスキップ」「@customer.com ドメインとのミーティングは常に録画」。ルールが一致したら、参加時刻マイナス 90 秒にボットをスケジュールします。自分でボットを dispatch したのと同じ完了時署名 webhook を受け取ります。
設計によりマルチテナント。あなたのテナント ID、エンドユーザーの ID、ルール、保持ポリシー — すべて分離され、すべてアカウント下の meetbot 管理画面で見えます。デフォルトで EU ホストで DPA に SCC 付き。US リージョンはリクエストに応じて利用可能。Google Workspace Marketplace 認証を申請中で、エンドユーザーが consent screen で我々ではなくあなたのアプリ名を見るようにします。
honest scope
The plumbing is in. The user-facing surface is not. M2 (Jun–Jul 2026) lands the four OAuth route skeletons + token-encryption helper; Q3 lands the full sync engine and the rules editor.
works today
OAuth route skeletons (M2 wave)
/api/v1/calendar/connect/google + /connect/microsoft route handlers exist (currently behind a feature flag). Token redirect round-trip works; refresh-token storage encrypted with the per-tenant KMS-derived key.
Calendar-invite intake (today's path)
Add bot@meetbot.dev to any meeting invite — our Cloudflare email worker parses the .ics attachment and dispatches a bot at join-time. Used by every meetbot account today.
Per-tenant token encryption helper
Refresh tokens are AES-256-GCM at rest with a key derived from the per-tenant KEK. Database admins cannot read them; only the orchestrator's runtime KMS principal can.
not yet
Background sync job (every 5 min, dedupe by iCalUid)
Q3 2026. The pg-boss schedule + the Microsoft Graph + Google Calendar pollers are designed but not wired.
JSON rules engine
Q3 2026. Predicates over event metadata: domain, attendee count, organizer, title regex, recurrence rules. Rules editor UI ships in /account/calendar.
Google Workspace Marketplace + Microsoft AppSource listings
Q3–Q4 2026. So your end-users see your app name on the OAuth consent screen, not ours. Verification process started.
Edit/cancel propagation to scheduled bots
Q3 2026. When the calendar event moves, the scheduled bot dispatch moves with it.
M2 calendar V2 foundation is shipped (4 OAuth route skeletons + token-encryption helper). Full sync engine + rules editor land in Q3 — see roadmap at /docs/ROADMAP.md.
計画中の機能
一度限りの OAuth リダイレクト URL を返します。provider ∈ {google, microsoft}。State が customer_user_id を round-trip。
エンドユーザーの 1 人について同期されたイベント。ページネーション、watermark 可能、ミーティング URL 抽出 (Meet/Teams/Zoom) を含む。
1 人のユーザーの録画ルールを設定。イベントメタデータに対する JSON 述語:ドメイン、参加者数、オーガナイザー、タイトル regex。
接続済みユーザーごとに 5 分ごと。iCalUid で重複排除。編集/キャンセルはスケジュール済みボット dispatch に伝播。
リフレッシュトークンはテナントごとの KMS 由来キーで暗号化。我々の DBA はトークンを読めません。オーケストレータの runtime KMS principal だけが読めます。
認証済みの Google Workspace Marketplace + Microsoft AppSource リスト (進行中)。ユーザーが OAuth consent screen でアプリ名を見ます。