Skip to content
Docs · WordPress

Connect cbot.dk to WordPress

Two free plugins connect your WordPress site to cbot.dk. You copy a few values from cbot.dk into WordPress — cbot.dk never gets a WordPress login, database or FTP access.

DA · EN · UK

The two plugins

Lynbro Floating Buttons

Shows the chat on your site (channel "cbot.dk") next to your other contact buttons. Needs only your widget id.

Lynbro Chat Bridge

Optional, for WooCommerce: lets the assistant answer from products, stock, shipping and the visitor's own orders, and sends leads to your form entries.

How to do it

  1. Create a free cbot.dk account and make a bot and a chat widget in a project.
  2. Open the project's WordPress page (Projects → your project → WordPress). The widget id is there.
  3. Chat only? Paste the widget id into Lynbro Floating Buttons → Channels → cbot.dk. Done.
  4. Shop data (WooCommerce)? Enter your shop's address under "Chat bridge" and press Save. Copy the bridge secret, shown once, into Lynbro Chat Bridge → Connection.
  5. Leads to WordPress — press "Create webhook secret" and paste it into the same plugin screen.
  6. API key — create a key for the site (read-only) and paste it. Press "Save and test" in the plugin: it shows the account name, plan and quota.

What is sent to cbot.dk

  • The visitor's chat messages, the page address and a random visit id (cookie/localStorage cb_visitor_id) — only once the chat is used.
  • Answers from your shop — only when the assistant asks, and only what the tool may show (public catalogue; the visitor's own orders only once your site vouched for the person).
  • For a logged-in visitor: a short-lived identity token with pairwise ids and an optional display name — never an e-mail, password or WordPress user id.

Security

  • No access to your site: the plugin calls cbot.dk with your API key, and cbot.dk calls only the two routes the plugin registered itself.
  • Every call from cbot.dk is signed (Lynbro Signature v1, ±300 s window, one-time event id against replays). The plugin refuses anything else.
  • Secrets are shown once; afterwards cbot.dk shows only their last four characters. The bridge secret is stored encrypted, the API key only as a hash.

How to remove access

On the project's WordPress page: "Revoke" next to the bridge secret, the webhook secret and the API key. It takes effect at once. Then deactivate the plugin in WordPress.

For developers

Signature on tool calls and webhooks

X-Lynbro-Timestamp: 1763380000
X-Lynbro-Event-Id: 3f0c2a5e-6b1d-4c8e-9a7f-2d4b8e1c0a99
X-Lynbro-Signature: v1=hex(HMAC-SHA256(secret, ts + "." + METHOD + " " + path + "." + raw_body))

Identity token (data-identity)

lbi1.<base64url(json)>.<hex HMAC-SHA256(bridge_secret, "lbi1." + base64url(json))>

{"iss":"your-shop.dk","vid":"<the widget visitor id>","sub":"<pairwise user id>",
 "name":"Anna","iat":1763380000,"exp":1763380600}

vid = the widget's visitor id: data-identity-url is called with ?vid=…, or the page sets
data-visitor-id and signs the same value. No sub = logged out. Max lifetime 1 h.

Widget API

<script src="https://cbot.dk/widget.js?id=w_…" data-launcher="none"
        data-identity-url="/wp-json/lynbro-chat/v1/identity" async></script>

window.cbotWidget.open();   window.cbotWidget.close();
window.cbotWidget.identify("lbi1.…");   window.cbotWidget.visitorId;
document.addEventListener("cbot:ready", (e) => console.log(e.detail.widgetId));

Errors from /api/v1/external/*

{"error": {"code": "scope_missing", "message": "…", "details": {"scope": "leads:read"}}}

invalid_key 401 · scope_missing 403 · permission_denied 403 · not_found 404 · validation_error 422 · rate_limited 429 + Retry-After
# origin_mismatch 403 and quota_exceeded 402 are reserved in the shared LynBro contract; cbot.dk does not send them yet.

The Test button calls GET https://cbot.dk/api/v1/external/v1/me with Authorization: Bearer cbot_pk_…. OpenAPI: /openapi/wordpress.json

Questions

Do the plugins cost anything?

No. Both plugins are free. You pay only for your cbot.dk plan (there is a free plan).

Can I use the chat without WooCommerce?

Yes. Floating Buttons and the widget id are enough. The chat bridge is only for shop data and leads.

What happens when I create a new bridge secret?

The old one stops working at once. Paste the new one into the plugin right away — until then the chat answers without shop data.