Connectors
An App calls a person's Gmail or another connected service from its server code, after that person approves it; no token ever reaches the App, the browser, or the agent.
What you can do
Use your own accounts inside an App. Connect a service such as Gmail to your Charming account once. When an App asks to use it, Charming shows its own approval window naming the App, its owner, and what the App may do: read, write, or delete. You approve or refuse each App separately.
Share an App, not your inbox. Everyone who opens a shared Gmail App connects and approves their own Gmail, and sees their own mail. Nobody, the App’s owner included, gets anyone else’s password or token. The owner can also choose to share their own account with the people they share the App with, limited to the access they pick, such as reading and never writing.
Know who can see your data. An App, its owner, and people who can edit it can see the data the App reads from your account, because anyone who can edit the App can change what it does with that data. The approval window says so before you approve.
Take it back at any time. Account settings → Connectors lists every service you can connect, the accounts you connected, and the Apps you approved. Revoke one App, or remove the account to stop every App at once.
Connectors work in every App that declares the tools it calls in its package.json. Services lists what you can connect.
Technical
A connector is a service, such as Gmail, that a person connects to their Charming account. A Connection is one person’s account at that service. An approval lets one App use one Connection at the access levels it names. Composio holds every OAuth token and runs each call. Charming decides whether a call may run and whose Connection serves it.
Copy this prompt for your agent
Build a Charming app that reads my Gmail. Read
https://charm.ing/docs/capabilities/connectors.md first.
Declare only the Gmail tools the app needs in package.json under
charming.permissions.server.connectors, call them from route handlers
with connectors.call, and give the app a Connect Gmail button for
anyone who hasn't approved it yet.
Call a connector
Declare each service and the tools the App calls in package.json under charming.permissions.server.connectors, a map from service slug to tool slugs such as { "gmail": ["GMAIL_FETCH_EMAILS"] }. Each save of an existing App trims its approvals to this declaration: dropping a service or tool deletes the approvals and owner sharing for it, and declaring it again later does not bring them back, so people approve it again. Those are the App’s declared tools: they decide which access levels a person approves and which tools a call may run. Then import { connectors } from 'charming:[email protected]' in server.js and, inside a route handler, call connectors.call(service, tool, args), where service is a slug from Services and tool is one of that service’s declared tools. Charming refuses a call to any tool package.json does not declare with connector_action_not_declared. Browser code cannot call a connector.
{
"name": "inbox-triage",
"version": "1.0.0",
"type": "module",
"charming": {
"name": "Inbox triage",
"permissions": {
"server": {
"connectors": { "gmail": ["GMAIL_FETCH_EMAILS", "GMAIL_ADD_LABEL_TO_EMAIL"] }
}
}
}
}
import { connectors } from 'charming:[email protected]';
export const routes = [
{
op: 'unread',
method: 'GET',
annotations: { readOnlyHint: true, destructiveHint: false },
handler: async () =>
connectors.call('gmail', 'GMAIL_FETCH_EMAILS', {
query: 'is:unread in:inbox',
max_results: 25,
}),
},
{
op: 'archive',
inputSchema: {
type: 'object',
required: ['messageId'],
properties: { messageId: { type: 'string' } },
additionalProperties: false,
},
annotations: { readOnlyHint: false, destructiveHint: false },
handler: async ({ messageId }) =>
connectors.call('gmail', 'GMAIL_ADD_LABEL_TO_EMAIL', {
message_id: messageId,
remove_label_ids: ['INBOX'],
}),
},
];
connectors.call resolves with the service’s result data, or throws a ConnectorError (below). App code never names a person or a Connection: Charming picks whose Connection serves the call from who is calling.
Services
A service’s slug is the key under charming.permissions.server.connectors and the first argument to connectors.call and charming.connect:
- Gmail (
gmail) - Google Calendar (
googlecalendar) - Google Drive (
googledrive) - Google Docs (
googledocs) - Google Sheets (
googlesheets) - Outlook (
outlook) - Slack (
slack) - Notion (
notion) - Linear (
linear) - GitHub (
github) - Asana (
asana) - Trello (
trello) - Airtable (
airtable) - Dropbox (
dropbox) - HubSpot (
hubspot) - Intercom (
intercom) - Calendly (
calendly) - Stripe (
stripe) - Aircall (
aircall) - Apaleo (
apaleo) - Attio (
attio) - Basecamp (
basecamp) - Bitbucket (
bitbucket) - Blackbaud (
blackbaud) - Boldsign (
boldsign) - Box (
box) - Cal (
cal) - Canva (
canva) - Capsule CRM (
capsule_crm) - ClickUp (
clickup) - Confluence (
confluence) - Contentful (
contentful) - Crowdin (
crowdin) - Dart (
dart) - Daytona (
daytona) - Dialpad (
dialpad) - Discord (
discord) - Dub (
dub) - Dynamics 365 (
dynamics365) - Eventbrite (
eventbrite) - Excel (
excel) - Exist (
exist) - Facebook (
facebook) - Fathom (
fathom) - Figma (
figma) - FreshBooks (
freshbooks) - GitLab (
gitlab) - Gong (
gong) - Google Ads (
googleads) - Google Analytics (
google_analytics) - Google BigQuery (
googlebigquery) - Google Classroom (
google_classroom) - Google Maps (
google_maps) - Google Meet (
googlemeet) - Google Photos (
googlephotos) - Google Search Console (
google_search_console) - Google Slides (
googleslides) - Google Tasks (
googletasks) - Gorgias (
gorgias) - Greenhouse (
greenhouse) - Gumroad (
gumroad) - Harvest (
harvest) - Hugging Face (
hugging_face) - Instagram (
instagram) - Jira (
jira) - Kit (
kit) - LinkedIn (
linkedin) - Linkhut (
linkhut) - Mailchimp (
mailchimp) - Microsoft OneNote (
onenote) - Microsoft Teams (
microsoft_teams) - Miro (
miro) - Monday (
monday) - Moneybird (
moneybird) - Mural (
mural) - NotebookLM (
notebook_lm) - Omnisend (
omnisend) - OneDrive (
one_drive) - PagerDuty (
pagerduty) - Pinterest (
pinterest) - Pinterest Ads (
pinterest_ads) - Prisma (
prisma) - Productboard (
productboard) - Pushbullet (
pushbullet) - QuickBooks (
quickbooks) - Reddit (
reddit) - Reddit Ads (
reddit_ads) - Roam (
roam) - Salesforce (
salesforce) - Sentry (
sentry) - Servicem8 (
servicem8) - SharePoint (
share_point) - Shippo (
shippo) - Splitwise (
splitwise) - Square (
square) - Stack Exchange (
stack_exchange) - Supabase (
supabase) - Ticketmaster (
ticketmaster) - Ticktick (
ticktick) - TikTok Ads (
tiktok_ads) - Timely (
timely) - Todoist (
todoist) - Twitch (
twitch) - Typeform (
typeform) - WakaTime (
wakatime) - Webex (
webex) - WhatsApp (
whatsapp) - Wrike (
wrike) - Yandex (
yandex) - YNAB (
ynab) - YouTube (
youtube) - Zendesk (
zendesk) - Zeplin (
zeplin) - Zoho (
zoho) - Zoho Bigin (
zoho_bigin) - Zoho Books (
zoho_books) - Zoho Desk (
zoho_desk) - Zoho Inventory (
zoho_inventory) - Zoho Invoice (
zoho_invoice) - Zoho Mail (
zoho_mail) - Zoom (
zoom)
A package.json that names a slug not on this list is refused with must be a known connector service at that key’s path.
Tools
Each tool is a Composio tool slug, such as GMAIL_FETCH_EMAILS. Each save locks every declared service at the toolkit version Charming’s catalog pins at that moment, and the App’s calls run at that version until it is saved again. When Composio deprecates a locked version, get_app and the App’s agent.json give whoever manages the App a connector-version-deprecated advisory with the date Composio stops serving it; saving the App again moves it to the current version. A restore keeps the versions the restored revision was built with, and so does a copy or Template copy, unless Composio has retired one, in which case the copy moves to the catalog’s version. Find a service’s tools with the MCP tool search_connector_tools, which takes a service slug, words from the tool slug such as free slots, or both, and read each tool’s input and result schemas with get_connector_tool_schemas or GET /api/v1/connectors/{service}/versions/{version}/tools. Composio’s toolkit page, https://docs.composio.dev/toolkits/<slug>, describes the same tools, for example Gmail. Charming’s catalog holds the toolkit’s tools at the pinned version, without deprecated ones, so a tool Composio added since may not be callable yet. Declaring a tool the catalog does not carry is refused on save: package.json fails with must be a <service> tool in the connector catalog at that entry’s path, such as /charming/permissions/server/connectors/gmail/2. Arguments are the tool’s own, in snake_case, and at most 64 KiB of JSON.
Gmail tools default user_id to me, the connected account. GMAIL_FETCH_EMAILS returns one email unless you set max_results (up to 500), takes Gmail search syntax in query, and does not sort by date: sort by internalDate yourself. GMAIL_ADD_LABEL_TO_EMAIL archives by removing INBOX and marks read by removing UNREAD; custom labels need their id from GMAIL_LIST_LABELS, not their name.
Access levels
Every tool has one access level:
| Level | What the tool does |
|---|---|
read |
Reads data and changes nothing |
write |
Creates or changes data, such as sending or labelling an email |
delete |
Deletes data, such as GMAIL_DELETE_MESSAGE |
The catalog leaves out tools that would give someone access lasting past a revocation or hand a credential to the App, such as sharing a Drive file, creating a Dropbox file request or upload link, adding a mail rule, filter, or send-as alias, creating a webhook, watch channel, or deploy key, inviting a person or adding them to a team or project, changing who can see or join a board, workspace, shared folder, or repository, weakening branch protection, writing a secret, minting a token, or setting up an automation that keeps acting on its own, such as a trigger, a workflow or alert rule, a deletion schedule, or an ad optimizer rule. It also leaves out raw GraphQL and batch request tools, since they can reach any of those. The level comes from Composio’s own tags on the tool: a destructive tool is delete, a read-only one is read, and anything else, untagged included, is write, unless Charming corrects a tag: a tool that sends, publishes, commits, refunds, or moves things is write even when Composio tags it destructive. A person approves an App for the levels its declared tools need, per service, and the approval window describes each level in that service’s words. Levels are independent: approving write does not approve read. When a new version of an App stops declaring every tool at a level, each approval and the owner’s shared access lose that level, and declaring it again later asks again. An App that stops declaring a service loses every approval and setting for it.
Adding a tool at a level the person already approved needs nothing from them; it runs on their next call. Adding a tool at a new level refuses their calls to it with connector_not_granted until they approve that level, and err.missingLevels names it. Their calls to tools at levels they approved keep working.
Errors
A refused or failed call throws an error with name === 'ConnectorError', a kind, and a fixed message. Check err.name, not instanceof. A call the service refuses, such as one with bad arguments, reads as connector_tool_failed; the service’s own message reaches the App’s agent only when the call ran on the caller’s own account. Arguments over 64 KiB of JSON are refused before any check runs: the call throws a plain Error, not a ConnectorError.
kind |
Means | What the App should do |
|---|---|---|
sign_in_required |
A signed-out visitor called. On 2026-10-25 and earlier, signed-out visitors never use a connector; on 2026-11-09, only through a function approved for anyone (see The 2026-11-09 contract). |
Sign them in with charming.login() or charming.withUser(...), then call again. |
connector_not_granted |
The caller has not approved this App for this tool’s access level (read, write, or delete), and the owner’s shared account does not cover them. When approving would help, err.missingLevels lists the access levels the App’s declared tools need that they have not approved. |
If err.missingLevels is present and not empty, show a Connect button whose click calls charming.connect(service), and call again when it resolves { granted: true }. If it is absent, approving again changes nothing: the owner’s settings keep this person off the connector, so tell them to ask the owner. |
connector_action_not_declared |
The App does not declare this service or tool. | Add it to charming.permissions.server.connectors in package.json and save the App. |
connector_route_not_declared |
On 2026-11-09, the running route called a tool its own file’s bundle does not call (or, for a route saved in a routes array before route files, a tool its uses does not list). |
Import the tool from its toolkit and call it in that route’s file, then save the App. |
connector_function_not_approved |
On 2026-11-09, the holder has not approved the running function, or its approval no longer matches the route or the holder. When approving their own account would help, err.missingLevels lists the levels. |
Ask the holder to approve the function in App settings, or offer charming.connect(service) when err.missingLevels is present. |
connector_no_person |
No person is behind the call: an App token call, a Webhook delivery, a call from another App through charming:app/<package-name>@1.0, or a call that names the person only by the App URL an agent handed out, as in an App shown inside Claude or ChatGPT. Also a Routine, or shared access where people cannot use their own account, when the App’s live version or the Routine was last saved by someone who does not manage the App. |
Nothing serves the first four. Run connector work from a person’s call on Charming or through their agent, or from a Routine, instead. For the last, someone who manages the App publishes the version or saves the Routine. |
connector_reconnect_required |
The account’s access expired or was removed at the service. | Ask the person to reconnect: charming.connect(service) offers it, or Account settings → Connectors. |
connector_tool_failed |
The tool ran and the service refused the call, for example over a wrong argument or a resource the account cannot reach. | Check the arguments against the tool’s Composio toolkit page before retrying. When the call ran on the caller’s own account, the agent reads the service’s message as error.serviceMessage from the App API or in error_details from MCP; the error App code catches carries only kind and message. |
connector_unavailable |
The service or Composio failed, or connectors are off on this server. | Show an error and let the person retry. |
connector_call_limit_exceeded |
The App owner’s monthly connector calls ran out. | Tell the person the App is out of connector calls this month. Only the owner’s plan or the new month lifts it. |
connector_rate_limited |
This person made more than 60 connector calls to this App in a minute. | Wait a minute, then retry. Fetch in pages instead of one call per message. |
connector_cross_site |
A link, form, or script on another site sent the signed-in person to the App, so the call may only read. A write or delete call refuses; a read call runs. |
Make changes from the App’s own page, through the api import from charming:ui/[email protected], never from a URL another site can open. |
connector_blocked_by_team |
The team that owns the App turned this service off for its Apps. Every call to it refuses, whoever makes it. | Tell the person the team turned the service off. Only a team owner or admin can turn it back on. |
connector_version_retired |
Composio stopped serving the toolkit version the App was built with: its sunset date passed. Every call at that version refuses, whoever makes it. error.service and error.version name it, and error.currentVersion is the version to import. |
Change every charming:connectors/<service>@<version> import of that toolkit to error.currentVersion and save the App, or save it again if it imports no toolkit. Then read the tools’ schemas at the new version with get_connector_tool_schemas, since they can differ. |
try {
return await connectors.call('gmail', 'GMAIL_FETCH_EMAILS', {
query: 'is:unread',
max_results: 25,
});
} catch (err) {
if (err.name === 'ConnectorError' && err.kind === 'connector_not_granted') {
return { needsConnect: true, missingLevels: err.missingLevels };
}
throw err;
}
A person who may only view the App, without app:run, may only read through a connector too, whoever’s Connection would serve them: a write or delete call throws the same forbidden_write error a storage write does, before Charming looks for a Connection, and the App API answers 403.
A ConnectorError the handler does not catch becomes the operation’s own refusal, with the same kind. The App API answers 401 for sign_in_required; 403 for connector_not_granted and connector_function_not_approved (with error.missingLevels when approving would help), connector_action_not_declared, connector_route_not_declared, connector_no_person, connector_cross_site, and connector_blocked_by_team; 409 for connector_reconnect_required; 410 for connector_version_retired, with error.service, error.version, and error.currentVersion; 422 for connector_tool_failed, with error.serviceMessage when the call ran on the caller’s own account; 429 for connector_rate_limited and connector_call_limit_exceeded; and 503 for connector_unavailable. connector_call_limit_exceeded is a plan refusal with error.plan, error.limit: "connector_calls_per_month", error.max, and error.upgradeUrl only when the caller is the App’s owner or an owner or admin of the team that owns it, or the call is a Routine tick, whose failures the owner reads. Anyone else, including a signed-in visitor of a public App, gets the same kind with a generic message and none of those fields. MCP query_app and mutate_app return the same kind as error_kind, with missingLevels, serviceMessage, or the retired version’s service, version, and currentVersion in error_details. In the browser, the api import from charming:ui/[email protected] rejects with a CharmingOperationError carrying that kind. A call from another App through charming:app/... gets no such refusal: an uncaught ConnectorError in the called App fails that call as operation_failed, so catch it in the called handler and return the answer you want the caller to see.
Ask for approval from the browser
charming.connect(service: string): Promise<{ granted: boolean }>
charming.connect.available: boolean
charming.connect.unavailableReason?: 'embedded-host' | 'custom-domain' | 'no-connectors'
charming.connect(service), such as charming.connect('gmail'), opens Charming’s approval window on Charming’s own origin. It lists what the App may do at each access level its declared tools need, says the App, its owner, and people who can edit it can see the data it reads, and lets the person connect the service if they have not, then approve. It resolves { granted: true } once they approve, and { granted: false } if they close the window or leave it open for 10 minutes without answering, when Charming closes it. Call it straight from a click: a blocked window rejects with a CharmingConnectError carrying reason: 'popup-blocked'.
Some services, such as Zendesk, Jira, Google Ads, and the Zoho family, ask for a value before their own sign-in: a workspace subdomain, a region, or an account ID. Connecting them shows a form from Composio, the company that runs the sign-in, that asks for it. Charming cannot fill the value in, so if an App knows it, show it near the Connect button.
Check charming.connect.available before offering the button. It is false inside a chat host (embedded-host), on a custom domain (custom-domain), and in an App that declares no connectors (no-connectors). There, charming.connect() rejects with a CharmingConnectError whose reason is that unavailableReason; send the person to the App’s Charming URL instead.
Whose account a call uses
| Caller | Whose Connection |
|---|---|
| A signed-in person who approved this App | Their own |
| A signed-in person who has not, when the owner shares their account with that person’s role | The owner’s shared account, limited to the access levels the owner shared, while someone who manages the App published its live version. Otherwise connector_not_granted with missingLevels, so they can approve their own, or connector_no_person when people cannot use their own |
| A signed-out visitor | None: sign_in_required. On 2026-11-09, a function approved for anyone is the exception (see The 2026-11-09 contract) |
| A Routine | The App’s connection holder, while someone who manages the App published its live version and last saved the Routine; otherwise connector_no_person |
An agent through query_app or mutate_app |
The person the agent is signed in as, by the same rules as that person in a browser. An agent never reaches anyone else’s Connection |
An App token, a Webhook delivery, or another App calling through charming:app/... |
None: connector_no_person |
| The App’s own page shown inside an agent such as Claude or ChatGPT, which names the person only by the App URL the agent received | None: connector_no_person. That URL is a long-lived link anyone it reaches can open, so it never acts as the person. Connectors need a signed-in Charming session, in a browser on Charming or the App’s custom domain, or the agent’s own sign-in through query_app and mutate_app |
A person’s own approval always wins over the owner’s shared account. The connection holder is the one person whose Connection serves Routines and owner sharing: the first person who can manage the App and approves it for that service, normally the owner, or a later manager who turns sharing on. App settings names them. While they can manage the App, the holder’s own calls use their own approval whatever the settings below say. Transferring or claiming the App removes every person’s approval and clears the holder. Each person approves again under the new owner, whom the approval names. Until someone who manages the App approves it again, sharing stays off and Routines refuse with connector_not_granted. While nobody holds the Connection, those refusals do not count toward turning a Routine off. A holder who loses manage access stays the holder, but sharing and Routines stop until they regain it or someone else who manages the App turns sharing on.
Routines and shared access use the holder’s account only while the App’s live version and the Routine were last saved by someone who manages the App. Charming checks this on every call, so a collaborator who can edit code or Routines but not manage the App cannot reach the holder’s account: once they publish a version or save a Routine, those calls refuse until a manager publishes or saves again. A Routine refuses with connector_no_person. A person the account was shared with gets connector_not_granted with missingLevels, as if nothing were shared, so the App can ask them to approve their own; when people cannot use their own, they get connector_no_person. A person’s own approval works whoever published the code.
The 2026-11-09 contract
2026-11-09 is the package contract whose routes import connector toolkits as functions, opted into with "$schema": "https://charm.ing/schema/app-package/2026-11-09.json" in package.json. A package.json with no $schema, or the 2026-10-25 URL, stays on 2026-10-25, and moving an App from 2026-10-25 to it is a contract migration. The rules below apply only to Apps on it.
- One route per file. server.js re-exports each route from its own file,
export { default as findTimes } from './routes/find-times.js', and each file’s default export is the route:export default { op: 'findTimes', input, outputSchema, handler }. The routes run in the order server.js re-exports them. The route’s fields are literals, and a refusal names the route file and line. One file re-exported twice is refused. Route files are JavaScript (.jsor.mjs) or TypeScript (.ts), re-exported by their full path, such as./routes/find-times.ts;export default { … } satisfies Routereads the same as the plain object. TypeScript is read with its types erased, so a refusal still names the author’s line, and syntax that needs code generated, such as anenum, is refused with its line and what to write instead. - Toolkit functions. A route calls a service by importing its tools as functions, such as
import { gmailFetchEmails } from 'charming:connectors/gmail@20261029_00', where the part after@is Composio’s toolkit version, a date followed by a two-digit number. Each function is its tool slug in camel case, soGMAIL_FETCH_EMAILSisgmailFetchEmails, and takes(input, { reason }), wherereasonis a sentence saying why the App makes the call; a call without one throws. Writereasonas a fixed string in the call itself, such asgmailFetchEmails({ query: 'is:unread' }, { reason: 'Listing unread mail' }): the build reads it so the person who approves the function can read it in App settings before the function runs. A save is refused with reasonunreadable-connector-reason, naming the file and line and the call to write, when a call has noreason, builds it at run time (from a variable or a template with${}), writes it twice, spreads arguments or options that could replace it, makes it longer than 200 characters, or passes the function on instead of calling it, and when a local reuses an imported function’s name. Put anything that changes per call in the input, not the reason.charming typeswritescharming-env.d.tswith a typed function for each tool the App imports and theRoutetype, so a TypeScript route file is checked locally before a save.charming devkeeps that file current while it runs, writing it again when a toolkit import changes;--no-typesturns that off. The build bundles each route file on its own, and the toolkit functions that bundle calls are the route’s tools, including functions a shared helper file imports for it. A call to any other tool refuses withconnector_route_not_declared. A route that calls a toolkit function may declare anoutputSchema; when it does, the schema must be closed (additionalProperties: falseon every object, and every array saying what its items are), and Charming refuses a result with any other field withinvalid_output, the same way whichever executor runs the App. Without one, the route returns whatever its handler returns, so declare one whenever the result comes from someone’s account. Calls run at the version the import names, on a save, a restore, and a copy alike. Charming asks Composio each day about every version a published App is locked to and records the dates Composio deprecates and stops serving it. Once a version’s sunset date passes, every call at it refuses withconnector_version_retired, which names the version to import; the App’s source never changes on its own. Once Composio deprecates a version or sets a date to stop serving it,get_appand the App’sagent.jsongive whoever manages the App aconnector-version-deprecatedadvisory naming each such version, that date, and the version to import. Publishing the new version turns off the App’s approved functions for that service until the holder approves them again.GET /api/v1/connectors/{service}/versions/{version}/tools?slugs=GMAIL_FETCH_EMAILS,…returns each named tool’s function name and the JSON Schema of its input and result at that version, for up to 50 tools; pass the names an App imports withfunctions=gmailFetchEmails,…instead ofslugs, never both; a version Composio does not have or has retired answers 404 with the version to import instead. Each caller may cause up to 200 reads from Composio an hour, and schemas Charming already holds cost nothing; past that the endpoint answers 429rate_limited. A save that imports Composio’s base version00000000_00, or one service at two versions, is refused with the file and line (reasonmixed-connector-versionsfor two versions). A version Composio does not have or has retired fails the build withapp_build_failed, naming the import and the version Charming’s catalog uses. Import functions by name: a namespace import, a re-export, and an import in browser code are refused. - What 2026-11-09 no longer reads. A save on
2026-11-09is refused with reasonremoved-from-next, naming the file and line and the form that replaces it, when it has aroutesarray,useson a route, an import ofcharming:[email protected](and soconnectors.call), orcharming.permissions.server.connectorsin package.json. An App saved on this contract before these were removed keeps running as it was, and a restore or copy of its earlier revisions still works; its next save must move to route files and toolkit imports. Rewriting a function this way turns its approval off until the holder approves it again. - The holder shares by function, not by service. App settings lists, for each service, the functions that use it, with what each needs, its description, and the tools it calls; opening that line shows the
reasoneach call gives, as written in the source. The holder turns each function on and picks who may call it: Anyone, Signed in, or Members. A function opens to anyone only when its route is read-only and every tool it uses reads; otherwise its route’scallersis the most it opens to, and members when the route names none. Let others use your Gmail here and the shared roles and levels do not apply, andPATCH /api/v1/apps/{appId}/connectors/{service}refusesshareEnabled,sharedRoles, andsharedLevelswith 400. It takesfunctionsinstead, mapping an op toanyone,signed-in, ormembers, or tonullto turn it off. Only the holder turns a function on or changes its callers, and their own approval of the App must cover what the function needs; any manager can turn one off. - When an approval stops counting. An approval holds while the route keeps the same tools, returned fields, and callers, and its approver still holds the service. A change to any of those turns the function off until the holder approves it again. For a route that is its own file, the approval also covers that route’s bundle: the route file and every App file it imports, the exact version of each package it bundles, and the toolkit version of each service it uses. A change to any of those turns the function off. Any other change to the App’s code, which runs in the same module and can still affect the function, keeps it on, and App settings marks it Code changed until the holder approves it again. A route saved in a
routesarray before route files has no bundle of its own, so a change to its code is always marked Code changed. Clearing the holder (a revoke, a disconnect, a takeover) deletes the service’s approvals, and a save that drops a route or a service deletes its approvals.GET /api/v1/apps/{appId}/connectorslists each function withreasons, one{ tool, reason }per reason a call gives, andapproval: { callers, current, codeChanged }. - A call from a function that is off refuses with
connector_function_not_approved. The holder’s own calls and calls from someone who approved the App with their own account run as on a dated contract. - Signed-out visitors. A function approved for anyone serves a signed-out visitor, including one who opens the App through a render link, from the holder’s account, while someone who manages the App published the running code. Every other signed-out call answers
sign_in_required, which does not say whether the function is approved. Signed-out calls are limited to 60 a minute per client address on each App.
Limit a function to what the caller is part of
An approved function reaches everything the holder’s account reaches, so a function that changes calendar events can change any event on the holder’s calendar. To let each caller touch only their own items, check the caller in the route itself: the handler reads the caller’s verified email as env.user.email (see Use a member’s email), looks the item up, and acts only when the caller is part of it.
// routes/move-meeting.js
import {
googlecalendarEventsGet,
googlecalendarPatchEvent,
} from 'charming:connectors/googlecalendar@20261010_00';
export default {
op: 'moveMeeting',
callers: 'signed-in',
input: {
type: 'object',
required: ['eventId', 'startTime'],
properties: { eventId: { type: 'string' }, startTime: { type: 'string' } },
additionalProperties: false,
},
outputSchema: {
type: 'object',
required: ['moved'],
properties: { moved: { type: 'boolean' } },
additionalProperties: false,
},
handler: async ({ eventId, startTime }, { env }) => {
const email = env.user?.email?.toLowerCase();
if (!email) return { moved: false };
const event = await googlecalendarEventsGet(
{ event_id: eventId },
{ reason: 'Checking that you are invited to this meeting' },
);
const invited = (event.attendees ?? []).some((a) => a.email?.toLowerCase() === email);
if (!invited) return { moved: false };
await googlecalendarPatchEvent(
{ calendar_id: 'primary', event_id: eventId, start_time: startTime },
{ reason: 'Moving a meeting you are invited to' },
);
return { moved: true };
},
};
Pass only the fields the caller may change: a patch that took attendees from the input would let an invited caller remove everyone else. env.user.email is absent when the caller’s address is not verified, so the check refuses them. The holder’s approval covers the route’s whole bundle, so a save that drops or weakens the check turns the function off until the holder approves it again. Charming does not check what a call reaches: the route is the only place this limit lives, and the holder sees it only by reading the route.
What the owner controls
The owner sets each declared service in App settings → Connectors at /<owner-handle>/~/apps/<app-name>/settings/connectors. The tab lists the declared services as rows, each saying whose account the App uses and how many people approved it; Manage on a row opens that service’s settings. The tab also lists the catalog, ten services to a page, with Connect for each service you have not connected and Disconnect for each you have: on its own before the App’s code calls any service, with a prompt to copy for the agent, and under Other services once it does. A service connected there is ready when the App asks for it. Disconnecting there removes the account from every App, as it does in Account settings → Connectors. The switches are named for the service. For Gmail they are:
- People can use their own Gmail. On by default. Off means only the shared account serves other people’s calls, and Charming refuses their approval of the App, since it would change nothing.
- Let others use your Gmail here. Off by default. On shares the owner’s approved account with the roles they pick (App members, Other people signed in to Charming), at the access levels they pick from those the App’s declared tools need. Turning it on shares
readalone when the App declares it, and nothing otherwise;writeanddeleteare shared only when picked. A dashboard can sharereadand neverwrite.
Once anyone has approved the App for the service, its settings say how many people use it, beside Revoke all, which asks once more before it acts. It withdraws every person’s approval of the App for that service, clears the holder, and turns sharing off, so Routines stop using it. Each person’s account stays connected, and anyone can approve the App again.
Only the holder can share their account more widely. Another manager can remove roles or access levels, turn sharing off, or turn it on with their own account, which makes them the holder; adding a role or level to someone else’s account is refused with connector_holder_only. A new holder starts from read shared with App members, whatever the previous holder chose, unless they pick other roles and levels in the same change.
Copying an App or a Template copies no approvals and turns sharing off.
What a team controls
A team’s owners and admins choose which services the team’s Apps may call, in Team settings → Connectors at /<team-handle>/~/settings/connectors, or through PATCH /api/v1/teams/{teamId}/connectors/{service} with { "allowed": false }. Every catalog service is on until someone turns it off. GET /api/v1/teams/{teamId}/connectors gives each service’s appCount, the number of team Apps whose live version calls it, with the first three by name, and GET /api/v1/teams/{teamId}/connectors/{service}/apps pages through all of them. While a service is off, every call to it from any App the team owns refuses with connector_blocked_by_team, and App settings says so. Approvals and App settings stay as they were, so turning the service back on restores them with no new approval. A Routine refused this way does not count it toward turning itself off. The setting follows the team, not the App: an App moved out of the team calls the service again, and one moved in stops.
Limits, access, and deletion
- Monthly allowance. A call counts against the App owner’s plan once Charming sends it to the service, whoever’s account served it, even if the service then fails. A call Charming refuses first never counts: one not approved or not declared, over the per-person rate, needing a reconnect, or over the argument limit. Free gets 500 calls a month, Pro 10,000, Business 10,000 per seat. Months are calendar months in UTC. See Plans.
- Per-person rate. 60 connector calls a minute per person per App. Routine calls share one bucket.
- Arguments. At most 64 KiB of JSON per call. A larger call throws a plain
Errorin the handler. - Claimed Apps only. An unclaimed App has no owner to count calls against, so every call refuses.
- What the App does with the data is up to the App. Charming does not stop App code from storing what it reads. Never write data from a person’s account into the App’s shared
kvstorage, where every other person using the App can read it. Fetch on open and return the result to the caller instead. - Removing a Connection. Account settings → Connectors, at
/<handle>/~/settings/connectors, lists every catalog service with a Connect button or the connected account. An account connected to a service the catalog no longer lists stays on the page, with Remove only. Remove takes the account out of Charming and Composio and revokes it at the service where Composio supports that; otherwise the page tells the person to remove Charming’s access in the service’s own account settings, and links Google’s connections page for Google services. Revoking one App’s approval leaves the Connection for the person’s other Apps. When the removed Connection or revoked approval belongs to an App’s holder, nobody holds that App’s service and sharing turns off until a manager approves again, so a later approval never resumes sharing on its own. Its Routines keep running and refusing, without counting toward turning them off, until someone who manages the App approves again. Deleting a Charming account deletes its Connections. - Reconnecting a different account. Reconnecting the same account keeps every approval. Charming counts it as the same only when the service returns the same stable identity: the email or login for Google (Gmail, Calendar, or Drive), GitHub, Outlook, Airtable, Asana, Calendly, Dropbox, and Trello, and the service’s own id for Slack (user and workspace), Notion, Linear, HubSpot (portal), and Stripe (account), where one login reaches several workspaces or accounts. The name shown for the account never counts. Google Docs, Google Sheets, and Intercom have no tool that names the account, so a reconnect there always counts as a different account. Reconnecting a different account, or one the service does not identify, removes every approval made through that Connection: each App asks again, and on Apps where the person’s account was the shared one, nobody holds it and sharing turns off until a manager approves again.
- Logging. Charming logs each call’s App, service, tool, caller kind, and outcome, never its arguments or results.
Related
- Secrets: call services that take a static API key
- Privacy and sharing
- Limits
- Browser runtime API
- Docs home
- llms-full.txt