Overview
Last updated
Was this helpful?
Last updated
Was this helpful?
Websockets are used for real-time, event-driven communication between clients and the MinChat server. They are useful in listening for specific events such as a new message received event.
The following is the socket URL endpoint to connect to.
it is recommended to use socket.io, however, you can also use any WebSocket library.
Specify the active user to listen to events.
Replace YOUR_API_KEY
with your API Key found on the MinChat , and USER_ID with the userID of the that will make requests.
Invoked when there is a new message in any conversation.
The following events require you to subscribe to listen to events for a specific chat by running the following code.
Invoked when there is a new message in the subscribed chat
Invoked when a message gets updated in the subscribed chat
Invoked when a message gets deleted in the subscribed chat
Invoked when a user in the conversation starts typing.
Invoked when a user in the conversation stops typing.
Replace YOUR_API_KEY
with your API Key found on the MinChat , and CHAT_ID
with the id of the conversation you would like to listen to events.