Skip to main content

B2B2B — Customer-Scoped Tool Connections

If you are a partner with downstream customers of your own, every customer needs to authorize tools (Google Sheets, Slack, Shopify, Cal.com, Zendesk, LeadSquared, etc.) with their own credentials, isolated from each other. The Vocobase B2B2B API gives each of your customers their own identity (PartnerCustomer) and their own connections, while you remain the single billing and integration boundary with us.
Mental model. Vocobase ↔ you (the partner) ↔ your customers. You authenticate to Vocobase with your rg_live_… API key. Your customers never log in to Vocobase. They authorize tools through one-time hosted URLs that you mint and hand off to them.

When you need this

  • You’re building a vertical app on top of Vocobase and need to serve multiple downstream customer accounts.
  • Each customer has their own Google Sheets / Slack / LSQ / Calendly / Shopify account and they should not share tokens with you or with each other.
  • You want to bind agents to a specific customer’s connection at runtime.
If you are a single-team partner using your own tool credentials, you do not need this surface — connect tools directly under your account from the dashboard at /dashboard/settings/integrations.

Glossary


Discover available connectors

Before you can offer connectors to your customers, list the catalog your account has access to. Admin controls visibility per partner — if a connector you expect is missing, ask the Vocobase team to grant it.
Response
GET /api/v2/connectors/:slug returns a single connector by slug — useful when you already know which one you want.
Only ACTIVE connectors are returned. The dashboard may show COMING_SOON previews for partners; the API filters those out because they have no working programmatic OAuth path.

Create a customer

Customers are identified by a stable external_id of your choice — your own primary key for that downstream account. Re-creating with the same (partner, external_id) pair is idempotent, so a sync that runs on every deploy is safe.
Response

List, get, update, archive

DELETE is archive, not delete — the row stays for audit. Their tool connections are immediately revoked (tokens cleared, AgentTool bindings dropped). Archived customers cannot mint new connect-links until reactivated by Vocobase support.
This is the core handoff for OAuth-style connectors (Google Sheets, Slack, Shopify, etc.). You mint a one-time URL, hand it to your customer however you like (in-app button, email, SMS), and they complete authorization without ever touching your or our credentials.
Response

redirect_uri rules

The redirect_uri is where the customer’s browser lands after authorization. Strict validation, intentionally:
  • Must be https://
  • Must NOT contain @, fragment (#…), or userinfo
  • Must use the default port (443)
  • Host must EXACT-match an entry in your allowed_redirect_hosts. If unset, falls back to the host of your webhook_url. Ask Vocobase to register additional hosts on your PartnerConfig.
A redirect_uri that fails validation returns 400 INVALID_REDIRECT_URI with a message explaining which rule was violated.

Callback contract

Vocobase appends query parameters to your redirect_uri. Reserved parameters: Your existing query parameters in redirect_uri are preserved. Reserved keys overwrite.

Shopify

Shopify uses a per-shop OAuth handshake. The hosted page first prompts for the shop domain (mystore.myshopify.com), then redirects to Shopify. Other than the extra prompt, the flow is identical from your point of view — same connect-link mint, same callback contract.

Direct credential submission (no hosted UI)

For non-OAuth connectors (Cal.com, Calendly, Zendesk), you can skip the hosted handoff and submit credentials directly from your backend if your customer prefers to give them to you over phone/email.

Cal.com / Calendly — single API key

Zendesk — compound credential

Both endpoints return:
If the customer is ARCHIVED, the call returns 409 CUSTOMER_NOT_ACTIVE.

Inspect a customer’s connections

Per-tool status (catalog view)

Returns every connector on your account along with this customer’s connection status — empty if not yet connected, or populated with id, status, provider_email, connectedAt.

Just the connections (no catalog merge)

Revoke

Revokes at the provider (best-effort), clears the encrypted tokens locally, and deletes any AgentTool rows that pointed to this connection. Returns 204 No Content on success, 404 CONNECTION_NOT_FOUND if the id doesn’t match this customer.

Bind an agent to a specific customer’s connection

Agents are owned by you. With B2B2B, an agent can be bound to a specific customer’s connection so that when the agent runs a session for one customer, it uses that customer’s connected tool account.

List eligible connections for an agent

Returns every connection (yours + your customers’) that this agent can be bound to.

Inspect what’s currently bound

Returns one row per (slug, owner) for this agent showing whether the binding is enabled.

Bind / unbind

The optional connection_id disambiguates when multiple connections share a slug (which is common in B2B2B — you might have a Google Sheets connection AND each customer might have one). Without connection_id, the binding falls back to your own connection for that slug.
Response
To unbind, pass enabled: false with the same connection_id.

Connector visibility (admin-controlled)

Vocobase admins curate which connectors your account can offer. Granting a connector to your account automatically makes it available to all of your customers. There is no per-customer connector grant. If GET /api/v2/connectors returns an empty list, you have no connectors yet — contact Vocobase support to onboard the ones you need. If connector availability changes, existing active connections remain available unless Vocobase support tells you otherwise.

Error reference

All endpoints return the standard envelope:

Limits


What’s not in scope

  • Per-customer billing. ₹ is billed to your partner account, not to individual customers. (Track per-customer usage from session metadata or session listing.)
  • Sub-tenant logins. Customers don’t log in to Vocobase. They authorize via connect-links you mint.
  • Per-customer agents. Agents are owned by you; you bind them to specific customer connections at runtime via connection_id.
  • Per-customer webhook routing. Your single webhook_url receives events for all customers; the payload’s partner_customer_id distinguishes them.