Skip to main content

Get User Session Info using Bearer Token

This request gets information about the user session for the Bearer authToken included in the request headers, which was obtained using Initiate User Session using Key and Secret.

Authorizations: All

Requests

NONE
GET /apis/authentication/login/key

Response

Example:

JSON
{
 "data": {
  "admin": true,
  "assets": {},
  "authToken": "<auth token>",
  "displayName": "User0Groups TheUser",
  "groups": [],
  "id": "d2be5490-f70e-4132-9570-d8a45d94204f",
  "lastAction": "2025-03-21T19:20:01.099Z",
  "lastLoginDate": "2025-03-21T17:29:07.272Z",
  "provisionType": "jit",
  "numLoginFailures": null,
  "preferredUsername": "43ab703c-9a65-4c89-b005-daebc663590f",
  "roleIds": ["912cf463-409a-4df0-89ff-68016b213c77"],
  "roles": [
     {
       "id": "912cf463-409a-4df0-89ff-68016b213c77",
       "name": "Administrator",
       "admin": true,
       "permissions": {}
     }
  ],
  "sections": {},
  "sessionId": "2167935c-5633-4aad-a814-2279bc928944",
  "sessions": {},
  "sharePermissions": {},
  "sources": {},
  "username": "43ab703c-9a65-4c89-b005-daebc663590f",
  "serviceMessages": [
    "Password change required for built-in user account (operator)"
  ]
 }
}

Caution

  • This data is informational only and subject to change in future HMP releases.

  • REST API developers are encouraged to check for a 200 OK status to verify that a session is valid, but otherwise ignore this response except for the authToken field. REST API applications that use the data from this response may stop functioning and break user logins if this response is changed.

Error

Code

Payload

Description

401

{"code":"020001","name":"UserNotAuthorized",
"message":"User has no roles assigned",
"httpStatusCode":401}

User has no role assigned.

500

{"code":"070000","name":"InternalServer",
"message":<Error message>,
"httpStatusCode":500}

An internal error occurred.

503

{"code":"090002","name":"ServiceUnavailable",
"message":"No connection to authentication server",
"httpStatusCode":503}

Authentication service is unavailable. Please try again later.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.