mint_handle
mint_handle
Issue a signed handle for a new conversation, generating a conversation id when you don’t supply one. The handle carries the id and an expiry, signed with the gateway’s HMAC secret.
The browser never names a conversation. If it did, a publishable key plus a guessed id would be enough to continue someone else’s chat, so signing means a caller can only present handles this gateway issued.
The router mints handles for you. Reach for this when you want to hand a page a handle for a conversation your server already started.
Parameters
conversation_id
The conversation to bind the handle to. Generates a random id when omitted.
Returns
str — the signed handle, in the form <payload>.<signature>, both base64url.
Example
Read one back with read_handle().