Help Scout Beacon is an embeddable customer-support widget (web + mobile SDKs). hscli's Beacon support is intentionally bounded by Help Scout's API surface — Beacon configuration and analytics live in the Help Scout web UI only, with no REST endpoint to manage them. hscli covers the slice that is feasible: conversation-source analysis (via Mailbox API) plus local helpers for Secure Mode signing and embed-snippet generation.
| Command | Purpose |
|---|---|
hscli conv list --source <type> |
Filter conversations by source.type |
hscli conv export --source <type> |
Same filter on bulk export |
hscli report beacon [--since N] [--mailbox] |
Aggregate convs by source.type/source.via with percentages |
hscli beacon sign --email --secret |
HMAC-SHA256 of email for Secure Mode |
hscli beacon verify --email --secret --signature |
Verify a candidate signature (exit 0 on match, 1 on mismatch) |
hscli beacon embed <id> [--color] [--position] [--style] [--text] [--icon-image] |
Generate <script> embed block |
hscli beacon identify-snippet --beacon-id --secret --stack |
Generate server-side identify code (node / rails / php / django / python) |
source.type values: api, beacon, channel, chat, consumer, coreapi,
customer, email.
| Want | Reality |
|---|---|
GET /v2/beacons / PATCH /v2/beacons/{id} |
No endpoint exists. Beacon CRUD is web-UI only |
| Beacon usage dashboards | Web UI only (use hscli report beacon for source-derived approximation) |
| Enable / disable a Beacon remotely | Web UI only |
| Update color, prompts, custom fields via API | Web UI only |
| Push Docs article suggestions server-side | Beacon's suggest() is client-side only |
| Trigger Beacon events (open/close/chat) | Pure client-side JS |
| Mobile SDK config (iOS / Android) | Out of scope (large SDK config, low CLI ROI) |
Useful workarounds:
- Webhook events — Beacon emits HS webhooks (
chat-started,email-sent,message-clicked). Subscribe via existinghscli webhook create/listcommands. - Source-derived analytics —
hscli report beaconaggregates conversations by their origin (beacon / chat / email / api), giving you a workable proxy for per-channel volume. - Article IDs — Beacon's
suggest()andarticle()JS methods need Docs article IDs. Use the Docs API (planned v0.8) to fetch them programmatically.
export HSCLI_BEACON_SECRET="your-secret-from-beacon-settings"
hscli beacon sign --email user@example.com
# → 8a3f...e92Use the output as the signature argument to Beacon('identify', { … }) in
your page.
hscli beacon verify --email user@example.com --secret KEY --signature 8a3f...e92
# → valid (exit 0)
# OR
# → invalid (exit 1)hscli beacon embed YOUR_BEACON_ID --color "#5b21b6" --position right --style iconAndText --text "Help"Paste the output into your HTML's <head> (or just before </body>).
hscli beacon identify-snippet --beacon-id YOUR_BEACON_ID --secret KEY --stack rails
hscli beacon identify-snippet --beacon-id YOUR_BEACON_ID --secret KEY --stack php
hscli beacon identify-snippet --beacon-id YOUR_BEACON_ID --secret KEY --stack node
hscli beacon identify-snippet --beacon-id YOUR_BEACON_ID --secret KEY --stack django
hscli beacon identify-snippet --beacon-id YOUR_BEACON_ID --secret KEY --stack pythonDefaults to node. Templates use environment variables for the secret — never
inline the real secret in source files. Treat the output as a starting point
to paste into your codebase.
hscli report beacon # last 30 days
hscli report beacon --since 7d
hscli report beacon --since 7d --mailbox 42
hscli report beacon --output json | jq .Output groups by source.type and source.via, ranked by count.
hscli conv list --source beacon --limit 20
hscli conv list --source chat --status active
hscli conv export --source beacon --format ndjson > beacon-convs.ndjson-
--sourceis a client-side filter. Help Scout's API does not exposesourceas a query parameter. hscli fetches the same pages and filters locally. On large accounts this is slow — narrow the window with--sinceor--mailbox. The implementation streams pages and stops once--limitmatching items are collected. -
Secret handling. Pass the Beacon secret via
--secret, theHSCLI_BEACON_SECRETenv var, or your shell's secret manager. Never commit the secret to source control. The generated identify-snippet templates read fromBEACON_SECRETenv var by design. -
HMAC algorithm. Help Scout Beacon Secure Mode uses HMAC-SHA256 with hex encoding. The signature input is the customer's email (not a JSON payload).
hscli beacon signandhscli beacon verifymatch this exact contract.
- Help Scout: Beacon Secure Mode
- Help Scout: Beacon JavaScript API
hscli webhookcommands for Beacon-emitted events