Skip to main content

handle_api_channel_bind

Function handle_api_channel_bind 

pub async fn handle_api_channel_bind(
    __arg0: State<AppState>,
    headers: HeaderMap,
    __arg2: Json<ChannelBindBody>,
) -> Response<Body>
Expand description

POST /api/channels/bind — add an inbound identity to a pairing channel’s allowlist. Shares the exact bind core the CLI uses (bind_channel_identity_into), writes ONLY to peer_groups.<type>_<alias>.external_peers, and is gated by the same bearer auth as every other config write. Because the gateway and the running channels share one Arc<RwLock<Config>>, the swap makes the new peer live immediately — no daemon restart, and no /bind message.