# Meetings

> Create Zoom and Webex meetings with calendar events, hosted through a per-user grant or a server app.

URL: https://docs.workwae.com/guides/meetings

Set `onlineMeetingService` on a calendar event and Workwae creates a Zoom or Webex meeting for it. Connect a host first: each user's own grant, or one server app for the organization.

## Meetings with calendar events

With `onlineMeetingService` (`zoom` or `webex`) on a [calendar event](/guides/calendar#create), Workwae:

- creates the meeting and writes its join link into the event's `onlineMeetingUrl` on Google, Microsoft 365 and CalDAV;
- moves the meeting when the event moves;
- deletes it when the event is deleted or cancelled.

Meetings need the meetings module on in the workspace; without it the field answers 403 `plan_module_unavailable`.

```bash tab="cURL"
curl -X POST "https://api.workwae.com/v1/accounts/$ACCOUNT_ID/calendar-events" \
  -H "Authorization: Bearer $WORKWAE_API_KEY" \
  -H "content-type: application/json" \
  -d '{
  "calendarId": "'"$CALENDAR_ID"'",
  "subject": "Customer onboarding",
  "start": { "dateTime": "2026-11-03T15:00:00", "timeZone": "America/Chicago" },
  "end": { "dateTime": "2026-11-03T15:45:00", "timeZone": "America/Chicago" },
  "recurrence": ["RRULE:FREQ=WEEKLY;BYDAY=TU;COUNT=8"],
  "onlineMeetingService": "zoom"
}'
```

```ts tab="TypeScript"
const timeZone = "America/Chicago";
const event = await workwae.calendarEvents.create({
  accountId,
  calendarId,
  subject: "Customer onboarding",
  start: { dateTime: "2026-11-03T15:00:00", timeZone },
  end: { dateTime: "2026-11-03T15:45:00", timeZone },
  recurrence: ["RRULE:FREQ=WEEKLY;BYDAY=TU;COUNT=8"],
  onlineMeetingService: "zoom",
});
event.onlineMeetingUrl; // the Zoom join link
```

- A series gets a recurring meeting translated from its rule. A rule the service cannot repeat by is refused with `meeting_recurrence_unsupported` before anything is created.
- A new subject, start, end or rule moves the meeting.
- Changing one occurrence leaves the service's series alone; its join link works for every occurrence.
- Only one of `onlineMeeting`, `onlineMeetingUrl` and `onlineMeetingService` may be set (`multiple_meeting_options`).

Workwae only creates, updates and deletes meetings and looks up the host. It never reads recordings, chat, transcripts or participant lists.

## Who hosts the meeting

For each event, Workwae picks the host in this order:

1. The account's own grant at the service.
2. The tenant's server app for that service.
3. Otherwise it refuses with `meeting_service_not_connected`.

A grant that needs reconnecting is not passed over for the app.

| Option | How it works |
| --- | --- |
| User grant, platform app | The account's user signs in to Zoom or Webex through Workwae's app on a hosted page. The meeting is hosted by that service user. |
| User grant, your own app | The same, through your Zoom OAuth app (`zoom_oauth`) or Webex integration (`webex_oauth`). |
| Server app | A Zoom Server-to-Server OAuth app (`zoom_s2s`) or a Webex Service App (`webex_service_app`) hosts for every mailbox in the organization, as the service user with the mailbox's address. No per-user sign-in. |

- A server app is used only where the provider vouches for the mailbox's address: Gmail, Microsoft 365, and IMAP accounts signed in with Google or Microsoft OAuth.
- A password IMAP account needs its user's own grant.
- A mailbox with no matching user at the service is refused with `meeting_host_missing`.

## Per-user grants

### Create a connect session

Pass `meetingAppId` to sign in through your own app instead of Workwae's. Register the app's `redirectUri` at Zoom or Webex. With `useConnectDomain` on the app (set on create, or with `PATCH /v1/meeting-apps/{appId}`), the redirect URI is on your [connect domain](/guides/oauth-apps#connect-domain) instead of `api.workwae.com`.

```bash tab="cURL"
curl -X POST "https://api.workwae.com/v1/accounts/$ACCOUNT_ID/meeting-connect-sessions" \
  -H "Authorization: Bearer $WORKWAE_API_KEY" \
  -H "content-type: application/json" \
  -d '{ "service": "webex", "redirectUri": "https://app.example.com/settings/meetings", "state": "user-42" }'
```

```ts tab="TypeScript"
const { url } = await workwae.meetingConnectSessions.create({
  accountId,
  service: "webex",
  redirectUri: "https://app.example.com/settings/meetings",
  state: "user-42",
});
```

### Send the user to `url`

They see a page naming your tenant, the service and the account, and sign in at Zoom or Webex. The sign-in must finish in the same browser, and one link connects once.

### Handle the return

The user comes back to your `redirectUri` with the outcome and your `state`, for example `?status=success&service=webex&state=user-42`. Connecting again replaces the account's grant.

List an account's grants, or disconnect one. Disconnecting deletes the grant; existing meetings stay.

```bash tab="cURL"
curl "https://api.workwae.com/v1/accounts/$ACCOUNT_ID/meeting-connections" \
  -H "Authorization: Bearer $WORKWAE_API_KEY"

curl -X DELETE "https://api.workwae.com/v1/accounts/$ACCOUNT_ID/meeting-connections/webex" \
  -H "Authorization: Bearer $WORKWAE_API_KEY"
```

```ts tab="TypeScript"
const { items } = await workwae.meetingConnections.list({ accountId });
for (const connection of items) {
  console.log(connection.service, connection.email, connection.status);
}

await workwae.meetingConnections.delete({ accountId, service: "webex" });
```

## Server apps

Register one server app per service per tenant; a second answers `meeting_app_exists`.

- A new app starts unverified.
- `POST /v1/meeting-apps/{appId}/test` requests a token the way meetings will, optionally looks up a host by address, and marks the app `active` or `failing`.
- Deleting a server app leaves the meetings it created at the service.

```bash tab="cURL"
curl -X POST "https://api.workwae.com/v1/meeting-apps" \
  -H "Authorization: Bearer $WORKWAE_API_KEY" \
  -H "content-type: application/json" \
  -d '{
  "kind": "zoom_s2s",
  "name": "Acme Zoom",
  "accountId": "'"$ZOOM_ACCOUNT_ID"'",
  "clientId": "'"$ZOOM_CLIENT_ID"'",
  "clientSecret": "'"$ZOOM_CLIENT_SECRET"'"
}'

curl -X POST "https://api.workwae.com/v1/meeting-apps/$APP_ID/test" \
  -H "Authorization: Bearer $WORKWAE_API_KEY" \
  -H "content-type: application/json" \
  -d '{ "user": "priya@acme.com" }'
```

```ts tab="TypeScript"
const app = await workwae.meetingApps.create({
  kind: "zoom_s2s",
  name: "Acme Zoom",
  accountId: zoomAccountId, // from the app's credentials page
  clientId,
  clientSecret,
});
app.scopes; // what to grant the app in the Zoom Marketplace

const { app: checked, checks } = await workwae.meetingApps.test({
  appId: app.id,
  user: "priya@acme.com",
});
for (const check of checks) console.log(check.name, check.isOk, check.detail);
checked.status; // "active" | "failing"
```

## Errors and reauthorization

A 401 or 403 from the service is retried once with a fresh token. Refused again, the grant is marked `reauth_required` and `meeting_connection.reauth_required` is sent with the service, host email and reason. Mail and calendar sync never use meeting grants, so they keep running.

| Reason | Meaning |
| --- | --- |
| `meeting_service_not_connected` | No grant at the service and no server app the account may use. |
| `meeting_service_reauth_required` | The account's grant or the tenant's server app was refused. |
| `meeting_host_missing` | The server app has no user with the mailbox's address. |
| `meeting_recurrence_unsupported` | The service cannot repeat a meeting by the event's rule. |
| `meeting_deleted` | The meeting is gone at the service when Workwae tries to move it. |
| `meeting_service_rejected`, `meeting_service_unavailable` | The service refused the meeting, or could not be reached. |

Send the user to reconnect on the first two:

```ts
import { isApiError } from "@workwae/sdk";

try {
  await workwae.calendarEvents.create({ ...booking, onlineMeetingService: "zoom" });
} catch (error) {
  if (
    isApiError(error, "meeting_service_not_connected") ||
    isApiError(error, "meeting_service_reauth_required")
  ) {
    return askUserToConnect(booking.accountId, "zoom");
  }
  throw error;
}
```

> **Meetings outlive grants**
>
> Disconnecting a grant or removing the app leaves existing meetings and their links on the events.

Every route is in the [Meeting connections](/reference/meeting-connections) and [Meeting apps](/reference/meeting-apps) references.
