register

View as MarkdownOpen in Claude

Record what a nonce is a capability for. Call it from the dynamic-config callback of the dial that carried the nonce, reading call_id from the request the platform sent and never from anything the browser supplied. Expired entries are pruned on every call. A nonce that isn’t a non-empty string is ignored.

Parameters

nonce
strRequired

The random value your application placed in the dial’s handoff_nonce user variable. Read it with user_variables().

conversation_id
strRequired

The conversation this call continues. Keyword-only.

call_id
str | NoneDefaults to None

The platform call ID. Required for /handoff to end the call and for /say to deliver text. Keyword-only.

Returns

None

Example

def remember_nonce(query_params, body_params, headers, ephemeral_agent):
variables = user_variables(body_params)
handoff.register(
variables["handoff_nonce"],
conversation_id=gateway.read_handle(variables["chat_handle"]),
call_id=body_params.get("call", {}).get("call_id"),
)

See HandoffRouter for the full flow.