FinBaze for Platforms

Concepts

CredentialLooks likeLivesWhereUse
Secret keyfb_sk_live_… / fb_sk_test_…until you roll ityour server onlyexchange for a server token
Restricted keyfb_rk_…until you roll ityour server onlylike a secret key, limited to chosen scopes
Publishable keyfb_pk_live_… / fb_pk_test_…until you roll itbrowsersidentifies your platform to the SDK; grants nothing
Server tokenJWTshortyour servercall the GraphQL API
Client secretes_…_secret_…15 minutes, single useyour server → browser, oncestart an embed session
Embed tokenJWT, typ: embed1 hour by defaultinside FinBaze's iframe onlyrun the component's operations
Headless tokenJWT, typ: headless1 hour by defaultyour pagerun the headless hooks

From secret key to server token#

POST /v2/oauth2/token with grant_type=client_credentials and client_secret=<key>. A restricted key can ask for a subset of its scopes with scope.

From client secret to embed token#

  1. Your backend calls createEmbedSession and returns clientSecret to the page.
  2. The SDK's hidden controller iframe (on FinBaze's origin) calls exchangeEmbedSession. The exchange consumes the secret atomically: a second use fails with EMBED_SECRET_USED.
  3. The embed token is held in memory in that iframe and handed to component iframes over a private channel. It never reaches your page, local storage or cookies.
  4. Before the token expires the SDK asks fetchClientSecret for a new secret and repeats. There are no refresh tokens: your backend decides, every time, whether the user may continue.

A chain of refreshes ends after embed.max_chain_hours (12 by default); the user then needs a session minted without previousSessionId.

What a token can do#

An embed token is pinned to one company, one user and the components in the session. It can only run FinBaze's own operations for those components, and only the features you left on. Everything else is refused (EMBED_OPERATION_NOT_ALLOWED). See embed security model.

Revoking keys#

Revoking or rolling a secret, restricted or publishable key refuses new token exchanges at once. Server and user tokens already minted with that key stop working on the next request: immediately on the API server that handled the revocation and normally within a second on the others. When the internal message between servers is lost, a server's cache still expires after 10 seconds, so plan for up to 10 s in which an old token may still be accepted. The same applies to suspending your platform, disabling a platform user and removing a user's access to a company.

Rate limits#

Limits count requests per rolling minute and are shared by all API servers. Over a limit the API answers HTTP 429 with code RATE_LIMITED; wait for the next minute and retry with backoff.

WhatCounted perLimit per minute
GraphQL requests with a server or user tokenkey the token was minted with600
GraphQL requests with an embed or headless tokenplatform user600
POST /v2/oauth2/token with a platform keykey (by its lookup id), failed attempts included60
createPlatformUserTokenkey300
createPlatformCompanykey30 (it calls the company registers)
createEmbedSessionkey600
exchangeEmbedSessionpublishable key600
exchangeEmbedSessionIP address30

The same limits apply in the sandbox and in live. If you need more for a key, ask FinBaze: a key can carry its own request limit.

Revoking embed sessions#

revokeEmbedSession(id) ends one session; revokeEmbedSessionsForUser(platformUserId) ends all of a user's. Disabling a user or removing their access does this for you. Revocation takes effect within 15 seconds.