Comment on page
Overview
To receive the changes immediately, you need to connect to the Imber web socket service. After creating a contact and receiving the token, connect to the web socket as follows:
get
https://socket.imber.live
/
Connect to web socket (Socket.io example)
usage example
React
HTML
import socketIOClient from 'socket.io-client';
const socket = socketIOClient('https://socket.imber.live', {
query: 'token=:token&workSpace=:workSpaceId&contactId=:contactId',
transports: ["websocket", "polling", "flashsocket"],
});
<script src="https://cdn.socket.io/4.1.1/socket.io.min.js" integrity="sha384-cdrFIqe3RasCMNE0jeFG9xJHog/tgOVC1E9Lzve8LQN1g5WUHo0Kvk1mawWjxX7a" crossorigin="anonymous"></script>
<script>
const socket = io('https://socket.imber.live', {
query: 'token=:token&workSpace=:workSpaceId&contactId=:contactId',
transports: ["websocket", "polling", "flashsocket"],
});
</script>
Last modified 2yr ago