Connections
Connected accounts — link a provider account for your end-user.
Connecting a provider has two sides: your credentials (an auth config) and your end-user's account (a connected account). Stacklink keeps them strictly separate.
Auth config vs connected account
| Auth config | Connected account | |
|---|---|---|
| Belongs to | Your project | One tenant (end-customer) |
| Holds | Your OAuth client id/secret, or an API integration template | The user's authorized account + encrypted credentials |
| Scope | Per provider, per project | Per provider, per tenant |
| Example | "Our Zoho Books OAuth app" | "Acme Corp's Zoho Books org" |
Your side — the OAuth app or API key — is covered in Auth. The end-to-end flow your user walks through is in Connect an end-user account.
Multi-account & resolution
A tenant can connect several accounts for the same provider. At execution time Stacklink resolves which
to use: explicit accountId → accountAlias → the session's single account → the account marked
default. Sessions can require explicit selection when ambiguity matters.
Health, refresh, validate
Credentials are kept fresh automatically. A background worker validates accounts near expiry,
refreshes OAuth tokens (single-flight locked), and emits a stacklink.connected_account.expired
event if an account can no longer be used — so your app can prompt the user to reconnect.
Connect real accounts on the free plan
Connecting accounts and every tool call on them are standard ops — 20,000 free each month, hard-capped.