List Google Calendars
List the Google Calendars the connected account can write to.
GET
Only calendars where the connected Google account is an owner or writer are returned. Read-only calendars are left out, because the agent can't book into them.
Headers
x-workspace-idstringrequiredWorkspace identifier for the API. The call flow must belong to this workspace (or one of its sub-workspaces).
Query Parameters
pathwayIdstringrequiredThe _id of the call flow that has the Google Calendar connection.
Response Fields
calendarsarrayThe calendars the connected account can write to.
Errors
| Status | Body | When |
|---|---|---|
400 | {"error": "pathwayId query parameter is required"} | No pathwayId |
400 | {"error": "Invalid pathwayId"} | pathwayId isn't a valid ID |
403 | {"error": "You do not have access to this workspace."} | You aren't a member of the x-workspace-id workspace |
403 | {"error": "Pathway does not belong to this workspace."} | The flow belongs to another workspace |
404 | {"error": "Pathway not found"} | No call flow with that ID |
500 | {"error": "Failed to refresh Google Calendar token"} | The stored Google token could not be refreshed. Reconnect with Install Google Calendar |
{
"calendars": [
{
"id": "jane@company.com",
"summary": "Jane Doe",
"description": "",
"primary": true,
"timeZone": "America/New_York"
},
{
"id": "c_8f2e1a@group.calendar.google.com",
"summary": "Appointments",
"description": "Customer bookings",
"primary": false,
"timeZone": "America/New_York"
}
]
}Last updated on