Reference · the tools · gateway
make_topic_token
Make a token for posting to topics
What it does
Make a token a producer outside the box -- Cue, an email or webhook service, CI -- uses to post to this box's gateway: POST https://gateway.<this box>.<domain>/topics/<topic> with `Authorization: Bearer <token>`, or -- for a webhook whose sender lets you set only a URL (Jira, GitHub, Stripe) -- POST .../hooks/<token>/<topic>. The body is JSON {"text": ..., "data": {...}}, any other JSON (a webhook's own payload, kept whole as data), or plain text; its headers are kept too, but secrets and proxies', so a webhook's event type and signature reach the session. Up to 256 KB. It may post to the topics named and any under them. The token is shown ONCE, in this answer: give it to the producer, never put it in a file in a repository or in chat elsewhere. revoke_topic_token takes it back. At most 120 posts a minute.
What it needs to know
- name
- Who it is for, a short name: "cue", "postmark", "github".
- topics
- The topics it may post to.
- box · optional
- Which box: its name and account, "home.frank" or "jordan.northwind", or just "home" when only one of your boxes is called that. Omit it for your current box (switch_box changes it; list_boxes says which it is).
- session_box · optional
- The box this session runs on, if it runs on one of yours: its name, as the on-box instructions give it ("frankh90.hemlane"). With it, a call that names no box is checked against your current box.
Where it lands
On one of your boxes: the one named in box, or your default box when none is named.