Where to find your TBBN API keys
TBBN has two kinds of API key. Use the one for the product you're integrating:
| Key | Starts with | For | Where to create it |
|---|---|---|---|
| Merchant API key | tbbn_sk_sandbox_ (test), tbbn_sk_live_ (live) | The Trade Engine: listings, sellers, offers, trades, webhooks | merchants.tbbnetwork.com → API Keys |
| Space API key | tbbn_sk_space_sandbox_, tbbn_sk_space_live_ | The Space API: listing and booking your own Spaces from your systems | account.tbbnetwork.com → Space API keys |
A key is shown only once, when it's created. TBBN stores only a fingerprint of it, so it can't show it to you again. Copy it straight into your server's secret store.
Merchant API keys
You need a Merchant account. Keys are made in your Merchant Dashboard, where you can see what they do.
Test keys (tbbn_sk_sandbox_) work only in Test mode: a separate test account with its own
sellers, listings, offers, trades and webhooks. Nothing in it is public, it never trades with live
listings, and it isn't billed. You can use it while your application is being reviewed. The
Owner, Admins and Developers can create test keys.
Live keys (tbbn_sk_live_) work on your live account once TBBN has approved it. Only the Owner
or an Admin can create them.
- Go to merchants.tbbnetwork.com. If you aren't signed in, you're sent to tbbnetwork.com to sign in and brought back.
- For a test key, switch on Test mode at the top of the page. The first time, TBBN sets up your test account with two test sellers (listed under Test mode in the sidebar). For a live key, leave it off.
- Select API Keys in the sidebar, then Create test key or Create live key. Confirm the prompt for a live key: anything it creates is real. TBBN then emails you a code, and asks for it under Confirm it’s you.
- The key appears under New key secret — shown once. Copy it now.
The table lists every key by its first and last characters (Key), Environment (Test or Live), Scopes, Status, Last used and Limits — never the full secret. A test key made on your live account before test mode existed says it no longer works: revoke it and create a new one in Test mode.
Use it
Send it on every API call as a bearer token, from your server only:
Authorization: Bearer tbbn_sk_sandbox_…
See Authentication and Getting started.
Space API keys
A Space API key lets your organization run its own rooms, desks and offices from its own systems. It sees and books only your Business's Spaces.
You need a Business. Developers, Admins and the owner can create test keys; live keys need an Admin or the owner.
- Go to account.tbbnetwork.com. On Overview, find your Business and select Space API keys.
- For a test key, switch on Test mode and select New test key. For a live key, leave it off and select New live key, then enter the code TBBN emails you. Each mode shows only its own keys.
- Copy the key shown under Copy this key now — it won't be shown again.
- Under Bookings made with this key, choose Free internal reservations — no charge (for your own team's bookings) or Charge the person booked (when you rent your Spaces out).
- Optionally set the key's defaults — Default country, Default region/state, Default radius (miles), Booking consent (when charging the person booked) and Pinned Branch IDs — and select Save config.
See the Space API guide for what each setting does.
With Test mode on, the page also lists Test bookings — what your test keys booked. A test booking is never charged, never holds the Space and notifies nobody; select Open to give consent or simulate the payment as the person booked would.
Limit what a key can do
Select Change limits beside a key to set:
- Expires on: after that day the key stops working (
API_KEY_EXPIRED). Leave it empty and the key doesn't expire. - Allowed IP addresses or CIDR ranges: the key works only from these, one per line
(
API_KEY_IP_NOT_ALLOWEDfrom anywhere else). Leave it empty for any address. - Only at these locations (Space API keys): tick the locations it may act at. It finds and books only
there (
LOCATION_NOT_GRANTEDelsewhere). Tick none for all of them.
Select Save limits. On a live key, TBBN asks for an emailed code first. TBBN doesn't warn you before a key expires, so note the date.
Rotate or revoke a key
- Revoke stops a key working immediately. Use it when a key may have leaked or is no longer used.
- Rotate (Space API keys) issues a replacement and the old one stops working at once. Copy the new key — it's shown once. A live key needs an emailed code.
For a Merchant key, create a new key, switch your servers to it, then Revoke the old one.
If a key is found in public
TBBN watches for its keys in public code with GitHub. A real key found there can't be trusted any more, so TBBN revokes it straight away and emails the people who manage keys, saying where it was found. The key's row says Found in public, so TBBN revoked it. Create a new key, put it in your server's secret store, and remove the old one from where it was published: deleting the file isn't enough, it's still in the history.
Keep keys safe
- Never put a key in a website's front-end code, a mobile app, or a public repository. Keys belong on your server.
- Use test keys for development and testing; use live keys only in production.
- Give each environment or service its own key, so you can revoke one without breaking the others.
- Revoke keys used by people who leave your team.
Common questions
I lost my key. It can't be shown again. Create a new one and revoke the lost one.
My key starts sk_live_, without tbbn_. Older keys look like that and keep working. New keys
start tbbn_sk_, so they aren't mistaken for another company's keys.
"Production keys are available once TBBN approves your Merchant account." Your application is still under review. Keep building in Test mode.
My live key gets a 402 USAGE_BALANCE_EXHAUSTED or PAYMENT_REQUIRED error. Your plan
allowance is used up and your usage balance is below zero, or an invoice is unpaid. Top up, upgrade
or pay the invoice — see
Plans and billing. Test keys keep working.
Which key does a webhook use? Neither. Each webhook endpoint has its own signing secret — see Webhooks.
Still stuck? Ask in the community or contact us from tbbnetwork.com/contact.
