v1.0.0
Integrations
Connect TIMES to outside services with OAuth, credentials or a configure screen.
An integration moves data between TIMES and another service. It usually has a configure surface and a connect block.
{
"kind": "integration",
"mode": "runtime",
"ui": { "framework": "vite", "runtime": "iframe", "surfaces": ["configure"], "entry": "./dist/index.html", "uses_times_tokens": true },
"scopes": { "required": ["invoices:read", "events:subscribe", "state:read", "state:write"] },
"connect": { "mode": "oauth", "oauth": { "provider": "telegram" } }
}Connection lifecycle
- The merchant installs the integration and opens Configure.
- Your configure screen calls
client.api.connection()to read the status. - If disconnected, the host runs the OAuth flow. Tokens are stored by TIMES.
- Your worker calls
POST /api/v1/apps/runtime/v1/provider/tokento get a short-lived provider token when it needs one. client.api.disconnectConnection()clears secrets and keeps the integration installed.
Events
Subscribe with client.api.subscribe('invoice.created', handler) in the iframe, or receive the same events on your worker webhook in runtime mode.

