Get User Sessions

Product deprecation notice

Effective April 30th, 2026, Vonage In-App Messaging will no longer be available. Access for new users will be closed, and the service will be discontinued for all existing users.

If you have any questions regarding this product’s discontinuation, please contact your account manager or our support team.

Overview

This guide covers how to get a user's active sessions, which can be used as a way to show their online status.

Get a User's Sessions

Given a user's ID you can get their sessions. The call to get a user's sessions is paginated.

application.getUserSessions({ user_id: "USR-id", page_size: 20 }).then((user_sessions_page) => {
  // handle page of sessions
}).catch((error) => {
  // handle error
});

If the sessions page contains a session object, you can assume that the user has been recently connected to the Vonage Client SDK.