Deskhero Developer Hub
Back to deskhero.com
Account

Get user sessions

Lists the current User's own active sessions, both browser cookie sessions and personal API tokens, each with its login method, browser, IP address resolved to country, region and city, and last active time. The type argument selects which kind to return and defaults to all; UNKNOWN is rejected.

GET /api/sys/v{version:apiVersion}/account/get_user_sessions
Authorisation
Minimum role: USER

Request arguments

Name Type Source
typeENUM user_session_typeQuery
Request body example

Response

Status
200 (OK)
Type
DTO_user_session[]
Wrapper
DTO_response_wrap
Other statuses
400 (BadRequest), 403 (Forbidden)
Response body example
DTO_user_session
NameTypeReadOnlyDescription
idStringId
auth_idpENUM auth_idpAuth idp
session_typeENUM user_session_typeSession type
user_agentStringUser agent
browserStringBrowser
ip_addressStringIp address
ip_countryStringIp country
ip_country_infoDTO_countryIp country info
ip_regionStringIp region
ip_cityStringIp city
labelStringLabel
createdDateTimeCreated
last_activeDateTimeLast active
DTO_country
NameTypeReadOnlyDescription
idInt32Id
nameStringName
code2StringCode2
code3StringCode3
timezoneStringTimezone
dialcodeInt32Dialcode
is_eu_countryBooleanIs eu country
currency_codesString[]Currency codes
ENUM auth_idp
ValueNameDescription
0UNKNOWNUNKNOWN
1COGNITO_INTERNALCOGNITO_INTERNAL
2GOOGLEGOOGLE
3FACEBOOKFACEBOOK
4EXTERNAL_ADEXTERNAL_AD
5MICROSOFTMICROSOFT
ENUM user_session_type
ValueNameDescription
0UNKNOWNUNKNOWN
1COOKIECOOKIE
2JWT_TOKENJWT_TOKEN
-1ALLALL

Generated Aug 4, 2026 18:37