Function create_realtime_session

Source
pub fn create_realtime_session<C, Fut, B, E>(
    client: C,
    request: &RealtimeSessionCreateRequest,
) -> CreateRealtimeSession<Fut, B, E> 
where C: FnOnce(Request<String>) -> Fut, Fut: Future<Output = Result<Response<B>, E>>, B: Body,
Expand description

Create an ephemeral API token for use in client-side applications with the Realtime API. Can be configured with the same session parameters as the session.update client event.

It responds with a session object, plus a client_secret key which contains a usable ephemeral API token that can be used to authenticate browser clients for the Realtime API.