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
Connect to web socket (Socket.io example)

https://socket.imber.live/
Request
Response
Request
Query Parameters
contactId
required
string
id of contact
workSpace
required
string
id of workSpace
token
required
string
token of contact or member
Response
200: OK
{
"sid":"hK4PqB42v_zJVlHYCxxg",
"upgrades":[],
"pingInterval":25000,
"pingTimeout":60000
}

usage example

React
HTML
React
import socketIOClient from 'socket.io-client';
const socket = socketIOClient('https://socket.imber.live', {
query: 'token=:token&workSpace=:workSpaceId&contactId=:contactId',
transports: ["websocket", "polling", "flashsocket"],
});
HTML
<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>