Allows you to retrieve a list of session IDs associated with a particular user. This can be useful for managing user interactions and potentially retrieving specific sessions based on user IDs.

To create a session that belongs to a specific user just specify the user_id property when creating a new session using the newSession method.

Arguments

user_id
string
required

The user ID for which you want to retrieve a list of session IDs. It’s important to remember that this method relies on user IDs being associated with sessions during creation.

Response

sessions_ids
Promise<string[]>

Returns a Promise that resolves to an array of strings. Each string in the array represents the unique ID of a session belonging to the provided user. If no sessions are found for the specified user, the method will resolve to an empty array.

You can then use one of these methods with the IDs: