Skip to main content

Overview

@grantex/adapters provides pre-built adapters for popular APIs — Google Calendar, Gmail, Stripe, and Slack. Each adapter verifies grant tokens offline (JWKS), checks scopes, enforces constraints, and calls the upstream API.

Google Calendar

Scopes: calendar:read, calendar:write

Gmail

Scopes: email:read, email:send

Stripe

Scopes: payments:read, payments:initiate Supports constraint enforcement — payments:initiate:max_500 limits payments to $500.

Slack

Scopes: notifications:send, notifications:read

Constraint Enforcement

Scopes can include constraints that adapters enforce automatically:

Dynamic Credentials

Pass an async function instead of a static string:

Audit Logging

Connect adapters to Grantex audit:

Building Custom Adapters

Extend BaseAdapter to integrate any API:

Error Codes

Last modified on March 1, 2026