Skip to main content

Connect a System Through a Browser

Connect Gmail, Drive, Outlook, Notion, HubSpot, Slack or Sheets from code or an agent: hand the consent link to the person, then resume when it is done.

Some systems only let a person connect their account by signing in at the provider and agreeing to what Talonic may read. Your code or agent cannot do that step for them, so the API splits it in two: you start a connection with POST /v1/integrations/:connector/authorize, the person opens the returned authorize_url and confirms, and you resume by reading GET /v1/integrations/authorizations/:id until it reports how it ended.

The connection is made for the person behind your credential: the person who created the API key, or the person who signed in for an OAuth token. That person must open authorize_url in a browser where they are signed in to Talonic, in the same workspace. The page shows what is being connected and asks them to continue; only then does the provider sign-in start. Anyone else who opens the link is told the request does not exist, so a forwarded link cannot connect a stranger's account into your workspace.

Who may connect what is decided exactly as in the app. A person's own mailbox, notes or drive (Gmail, Outlook, Google Drive, OneDrive, Notion, Slack) can be connected by a member who may bring documents in; company-wide systems (SharePoint, Teams, HubSpot, Dropbox, Google Sheets) need the Integrations permission. Through the API, starting a connection needs the sources:write scope, and the person must hold the Integrations permission. Every new connection is private to the person who connected it until they share it.

A request expires 30 minutes after it starts. To reconnect an account, for example after the provider revoked access, start a new request for the same connector: the existing connection is renewed, not duplicated. To disconnect, call DELETE /v1/sources/:id; the stored provider access is revoked at once and nothing is read from the account afterwards.

Only send authorize_url to the person the request was made for. It works only for that person, signed in, in that workspace; for anyone else it shows "not found".
GET/v1/integrations/connectors
POST/v1/integrations/:connector/authorize

Body

sendbooleanGmail and Outlook only: the mailbox may also send mail, for delivering results by mail.
intakeobjectGmail, Notion and Slack only: what the first read brings in, applied the moment the connection exists. Same shape as PATCH /v1/sources/connections/:id/intake.
GET/v1/integrations/authorizations/:id
DELETE/v1/integrations/authorizations/:id
POST/v1/integrations/authorizations/:id/destination

Body

name*stringDestination name.
spreadsheet_id*stringThe id in the spreadsheet's URL (/spreadsheets/d/<id>/).
sheet_title*stringThe tab rows are written to.

Start, hand over, resume

curl -X POST https://api.talonic.com/v1/integrations/gmail/authorize \
  -H "Authorization: Bearer $TALONIC_API_KEY" -H "Content-Type: application/json" \
  -d '{"intake": {"window": "30d"}}'

# Send authorize_url to the person, then poll:
curl https://api.talonic.com/v1/integrations/authorizations/3b1f0c2e-8d4a-4f6b-9a7e-2c5d1e0f9a88 \
  -H "Authorization: Bearer $TALONIC_API_KEY"

Response

{
  "id": "3b1f0c2e-8d4a-4f6b-9a7e-2c5d1e0f9a88",
  "object": "integration_authorization",
  "connector": "gmail",
  "kind": "source",
  "status": "pending",
  "authorize_url": "https://app.talonic.com/connect/3b1f0c2e-8d4a-4f6b-9a7e-2c5d1e0f9a88",
  "expires_at": "2026-11-25T10:30:00.000Z",
  "created_at": "2026-11-25T10:00:00.000Z",
  "completed_at": null,
  "connection_id": null,
  "destination_id": null,
  "account": null,
  "error": null,
  "links": { "self": "/v1/integrations/authorizations/3b1f0c2e-8d4a-4f6b-9a7e-2c5d1e0f9a88" }
}

Errors

Errors

400VALIDATION_ERRORsend or intake given for a connector that does not take it, or the master view.
403forbiddenreason names why: insufficient_scope, insufficient_role (the person lacks the Integrations permission), no_person (a key created by nobody).
404RESOURCE_NOT_FOUNDNot a browser-sign-in connector, or a request that is not yours.
409RESOURCE_CONFLICTA destination from a request that is not a finished Google Sheets sign-in, or one already used.
503CONNECTOR_NOT_CONFIGUREDThis deployment does not offer the connector.

Frequently asked questions

Can my agent finish the sign-in itself?+
No. The provider asks the person to agree, in a browser, while signed in to Talonic. Your agent starts the request, gives the person the link, and polls the status until it is connected or failed.
What happens if someone else opens the link?+
They are told the request does not exist. A request belongs to the person behind the credential that started it, in that workspace, and nobody else can continue it.
How do I reconnect after access was revoked at the provider?+
Start a new request for the same connector and the same account. The existing connection is renewed and keeps its history; no second connection is created.