User Presence

Learn how to track user presence updates and check user status using ping.

Before you begin

  1. Register a QuickBlox account. This is a matter of a few minutes and you will be able to use this account to build your apps.
  2. Configure QuickBlox SDK for your app. Check out our Setup page for more details.
  3. Create a user session to be able to use QuickBlox functionality. See our Authentication page to learn how to do it.
  4. Connect to the Chat server. See our Connection page to learn how to do it.

Visit our Key Concepts page to get an overall understanding of the most important QuickBlox concepts.

Check if a user is online

🚧

This feature is coming soon. Please check back later. For more updates and questions, feel free to contact our Customer Support Team.

Ping user

QuickBlox SDK can send application-level pings to the user or server. As a result, you can check if a user is connected to the Chat server and if there is a connection with the Chat server.

const userId = 12345;

QB.chat
  .pingUser(userId)
  .then(function () { /* success */ })
  .catch(function (error) { /* handle error */ });

Argument

Required

Description

userId

yes

ID of the user.

Ping server

QuickBlox SDK can send application-level pings to a server. As a result, you can check if the user is connected to the Chat server and if there is a connection with the Chat server.

QB.chat
  .pingServer()
  .then(function () { /* success */ })
  .catch(function (error) { /* handle error */ });

What’s Next
Did this page help you?