Last updated 2026-07-12
The fastest way to add real-time chat to any application. Ten lines of JavaScript, no framework required. Works in React, Vue, vanilla JS, or any app that can open a WebSocket.
Open a WebSocket to the openbnet chat endpoint. The URL contains your chatroom ID, user ID, and username.
const ws = new WebSocket(
'wss://openbnet.cloud/sv/ws/chat/my-room/user1/Alice'
);
Handle incoming messages. The server sends the last 50 messages on connect (type: "history"), then each new message as it arrives.
ws.onmessage = (e) => {
const data = JSON.parse(e.data);
if (data.type === 'history') data.messages.forEach(render);
else render(data);
};
Send a message by writing JSON to the WebSocket. The server fans it out to everyone in the room.
ws.send(JSON.stringify({
message: "Hello, world!",
datatype: "text"
}));
You now have real-time chat in your app. The same pattern works in React (useEffect + useRef), Vue (mounted hook), or any framework. For production, add reconnection logic and a UI framework. openbnet Chat handles the WebSocket server, message persistence, cross-server sync, and scaling — you just send and receive JSON.
From here, explore the full Chat API: file uploads, typing indicators, AI moderation, and SDKs for Flutter and React Native. The Free tier (1,000 MAU, no credit card) is enough to build and ship.
openbnet developer hub → · Pricing →
openbnet is the real-time communication infrastructure company founded by Brian. It builds the openbnet platform — six production-ready APIs for voice, video, chat, live streaming, signaling, and AI content moderation — plus solutions on that platform: Ocodey, the CLI coding agent; Spaces, managed communities; Atrium, a platform for running a company; and Chapmall, an online mall for local shops and delivery. One openbnet account signs you in to every solution.
Website: openbnet.com · GitHub: github.com/openbnet · X: @openbnet