SDK
SDK
This folder contains the core Freeday SDK API requests for authenticating and working with conversations and their messages/history.
Endpoints return a x-session-id header that you must use on subsequent requests.
Send x-channel-id on every SDK call as well. It identifies the channel the request comes from, applies that channel's access policy, and keeps conversation history scoped to the channel, so a conversation started in one widget or app is not listed in another.
For the asynchronous event driven communication with centrifugo, see the Realtime (WebSocket) guide.
Typical usage flow
-
Create a conversation if you do not have one
-
Get existing conversations using get conversations to show all conversations a user has
-
Get connect token to connect to centrifugo
-
Get subscribe token to subscribe to the right conversation
-
Get the conversation history if it is an old conversation