Skip to content
Last updated

[F] createRealtimeClient

When working with realtime models you can make use of the RealtimeClient to make connection with the websocket easier. If you already work with a SkribbyClient then there's a good chance you don't need this function. You can fetch this via the client as well.

However, as the client requires a sensitive API key, there might be moments you want to use the realtime client without exposing the skribby client. For these purposes you can use the realtime client directly, as the realtime client only requires the websocket URL to operate. The websocket URL is provided to you when creating a new bot, so simply forward this URL to the front-end and create a new realtime client with this URL to enjoy all the features.

const realtimeClient = createRealtimeClient('https://ws.example.org/123456');

Returns RealtimeClient