Skip to main content

handle_api_channel_bind

Function handle_api_channel_bind 

pub async fn handle_api_channel_bind(
    __arg0: State<AppState>,
    principal: Option<Extension<RequestAuth>>,
    __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. Publishes the shared config, drains the supervised channel generation and schedules daemon reload without requiring an in-chat /bind message.