Skip to main content

Authentication

Every request is authenticated by sending the API Key as a Bearer token.

Authorization: Bearer blumnb-xxxx-xxxx-xxxx
  • Keys start with the blumnb- prefix.
  • Keys are issued, rotated, and revoked in TalkBridge Center. If a key is leaked, rotate it immediately in TalkBridge Center.
  • Keys are scoped to a brand (brandKey) — you can only access consultations of the brands the key is authorized for (tenant isolation).

Permission scopes​

You choose a key's permission when you issue it on the Agent Key management page. It opens once you are signed in to TalkBridge Center; it is not in the Center menu, so use this link. You can check it with the scope value of GET /api/agent/me.

Permission in CenterscopeTarget brandsWhat it can do
One brand · ReadBrandReadThe one brand you chooseRead
One brand · WriteBrandWriteThe one brand you chooseRead + send + channel settings changes
All brands · ReadTenantReadEvery brand in the account (including brands created later)Read
All brands · WriteAdminEvery brand in the account (including brands created later)Read + send + channel settings changes
Management onlyTenantManageEvery brand in the accountManage API only — consultation reads and sends return 403 FORBIDDEN

The APIs (under /api/agent/) for each item are:

  • Read — me, rooms, rooms/{userKey}/messages, conversations, conversation, profile, sysmsg, sysmsg/start(GET), channel/*(GET)

  • Send — send, send/rich, send/attachments, send/image, delete, end, end-with-bot, read, block, unblock, upload/*, sysmsg/start·sysmsg/start/delete(POST)

  • Channel settings changes — channel/domain·channel/chat·channel/schedule(POST)

  • If your integration is read-only, use a read key. A write key can not only send but also change channel settings (inbound domain, chat feature, consultation hours).

  • All-brands keys still name the target brand with brandKey (or brand) on every request. Omitting it returns 403 NO_BRAND_SCOPE.

  • A leaked All brands · Write key affects every brand. Keep it only on servers that truly need it.

Brand validation​

If the token is not authorized for the target brand, the request is rejected with 403 NO_BRAND_SCOPE. The brandKey (or brand) in the request body/query must be a value included in the brands list of the me response.

Example​

curl https://api.talkbridge.io/api/agent/me \
-H "Authorization: Bearer blumnb-xxxx-xxxx-xxxx"
{
"name": "My Brand Agent",
"scope": "BrandWrite",
"brands": ["mybrand", "ch-5d6e7f"],
"channels": [
{ "key": "mybrand", "type": "KakaoChat", "name": "KakaoTalk channel", "brandKey": "mybrand-1a2b3c", "brandName": "My Brand" },
{ "key": "ch-5d6e7f", "type": "Line", "name": "LINE official account", "brandKey": "mybrand-1a2b3c", "brandName": "My Brand" }
]
}
  • brands: the Brand Keys this key can use. There is one per channel, so a brand with several channels has several values.
  • channels: details of the same list. key equals the value in brands, alongside the channel type (type: KakaoChat, Line, NaverTalk), channel name and owning brand.
    • channels[].brandKey identifies the brand itself and is not the value to put in a request's brandKey. Use key in requests.
note
The me response has no envelope

Other APIs respond with a { ok, code, message, … } envelope, but GET /api/agent/me returns { name, scope, brands, channels } without one. An invalid key gets a 401 with no body.

userKey format​

userKey is the customer identifier that Kakao issues per channel (brand). Do not assume a format — store and compare it as an opaque string.

  • Character set: ASCII letters, digits, _, and -. Variable length (around 12 characters in practice), case-sensitive. Example: Ab3d_x9Kq2Lm
  • Never assume the same person across channels — the same customer gets a different value on a different brand.
  • It does not change on block/unblock; it changes if the customer leaves and rejoins KakaoTalk.
  • The userKey in the inbound webhook and the userKey in the outbound API are the same value — if you validate it with a regex, keep it loose, e.g. ^[A-Za-z0-9_-]{1,64}$.
The three integration keys — this is different from the signing secret

The API Key (blumnb-) is for REST call authentication. The signature verification key (whsec_) that verifies the integrity of inbound webhooks is separate and is covered in Webhook signature verification. Together with the Brand Key (brandKey) that selects the target brand, these three values make up integration security — all three are shown in the "Integration keys" card in Developer mode of TalkBridge Center.