The official SDKs wrap every API endpoint in a typed method. They take the region from your API key, retry rate limits and provider hiccups for you, turn errors into exceptions with a stable code, and check webhook signatures in one call.
| Node.js SDK | Python SDK | |
|---|---|---|
| Package | bentocal on npm | bentocal on PyPI |
| Runs on | Node.js 20+, Bun, Deno, Cloudflare Workers, Vercel Edge | Python 3.11+, sync or asyncio |
| Dependencies | None | httpx |
| Types | Generated from the API's OpenAPI document | TypedDicts generated from the same document |
npm install bentocal and pip install bentocal work.A first call
Both clients read BENTOCAL_API_KEY from the environment. The key already says which region your application lives in, so there's no base URL to set. See Authentication and API keys.
import { BentoCal } from 'bentocal';
const bentocal = new BentoCal();
const session = await bentocal.connectSessions.create({
user_id: 'user_123',
redirect_uri: 'https://app.example.com/calendar/connected',
});from bentocal import BentoCal
client = BentoCal()
session = client.connect_sessions.create(
user_id="user_123",
redirect_uri="https://app.example.com/calendar/connected",
)Fields use the API's own names (user_id, slot_duration_minutes) in both SDKs, so the API reference applies as written. The language pages walk through connecting a calendar, finding a time, writing events, verifying webhooks, errors, retries and configuration.
What both SDKs share
- Retries: network errors,
429and502–504are retried twice with exponential backoff, honouringRetry-Afterup to 60 seconds. Each attempt times out after 30 seconds. - Errors: API errors are
BentoCalApiErrorwithstatus,code,detailsand the request ID; network failures and timeouts areBentoCalConnectionError. See Errors. - Webhooks:
webhooks.verifychecks theBentoCal-Signatureheader against the raw body, rejects signatures more than five minutes old, and accepts both secrets during a rotation. See Webhooks. - Environment variables:
BENTOCAL_API_KEY,BENTOCAL_WEBHOOK_SECRETandBENTOCAL_BASE_URL.
Methods
| Node.js | Python | Endpoint |
|---|---|---|
connectSessions.create | connect_sessions.create | POST /connect_sessions |
connectSessions.get | connect_sessions.get | GET /connect_sessions/{id} |
users.get | users.get | GET /users/{user_id} |
users.update | users.update | PATCH /users/{user_id} |
users.delete | users.delete | DELETE /users/{user_id} |
connections.get | connections.get | GET /connections/{id} |
connections.delete | connections.delete | DELETE /connections/{id} |
connections.listCalendars | connections.list_calendars | GET /connections/{id}/calendars |
freeBusy.query | free_busy.query | POST /free_busy |
availability.query | availability.query | POST /availability |
events.upsert | events.upsert | PUT /users/{user_id}/events/{event_id} |
events.delete | events.delete | DELETE /users/{user_id}/events/{event_id} |
webhooks.verify | webhooks.verify | Checks a webhook locally |
Not using Node.js or Python? Every SDK call is one HTTPS request; the API reference has them all. Both SDKs are MIT licensed.