currentUser.subscribeToRoom({
roomId: myRoom.id,
hooks: {
onNewMessage: message => {
console.log("Received new message ", message.text)
}
}
})currentUser.sendMessage({
text: "Hi folks! 👋 ",
roomId: myRoom.id
}).then(messageId => {
console.log("Message sent")
}).catch(error => {
console.error("error", error)
})Chatkit is the new Pusher service that adds chat to your web and mobile apps. With Chatkit, you can add chat to your app in a matter of hours, not weeks.
It comes packed with features that make your life as a developer easier. We support iOS, Android and JavaScript with more coming soon.
See who’s typing in realtime.
Find out who’s online and who’s offline.
Decide if a room is for everyone or not.
Don’t worry about your database filling up.
Keep things safe & secure with ease.
Familiar APIs across web and mobile.
Send a GIF, share some photos or videos, or distribute a PDF, all without the hassle of having to store any of them.
Easily see the status of each a message, and whether it has been delivered and read by a user.
Try it for free while in public beta (and we’ll always have a generous free plan)
By signing up you’re accepting our beta-product terms and conditions.
© 2018 Pusher Ltd. All rights reserved.
Pusher Limited is a company registered in England and Wales (No. 07489873) whose registered office is at 28 Scrutton Street, London EC2A 4RP.