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
1
import socketIOClient from 'socket.io-client';
2
3
const socket = socketIOClient('https://socket.imber.live', {
4
query: 'token=:token&workSpace=:workSpaceId&contactId=:contactId',
5
transports: ["websocket", "polling", "flashsocket"],
6
});
Copied!
1
<script src="https://cdn.socket.io/4.1.1/socket.io.min.js" integrity="sha384-cdrFIqe3RasCMNE0jeFG9xJHog/tgOVC1E9Lzve8LQN1g5WUHo0Kvk1mawWjxX7a" crossorigin="anonymous"></script>
2
<script>
3
const socket = io('https://socket.imber.live', {
4
query: 'token=:token&workSpace=:workSpaceId&contactId=:contactId',
5
transports: ["websocket", "polling", "flashsocket"],
6
});
7
</script>
8
Copied!