Category / Section
Retrieve User's Active Session using Bold BI REST API
Published:
This article provides guidance on how to retrieve the user’s active session using the REST API in Bold BI. To authenticate the API, you will need to provide the client credentials (client ID and secret).
Retrieving the user’s active session
To retrieve the user’s session, you can use the following API endpoint: In the request URL, please pass user id, username or email address of the user.
Method | URL |
---|---|
GET | /api/v2.0/users/{user_id/email/username}/active-session |
Authentication
To authenticate the API, refer to this link to learn how to obtain the authentication token. You need to include the access token in the request header as follows:
Header Name | Header Value |
---|---|
Authorization | Bearer <access_token> |
Sample Request
Sample Response
{
"api_status": true,
"data": [
{
"user_id": "fc1ee524-f153-487f-a849-0e2836427e50",
"session_id": "1b275f49-edfc-4354-a317-3a7200c9fa66",
"logged_in_domain": "http://localhost:60109",
"logged_in_time": "2023-11-03T12:53:23",
"browser": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36"
}
],
"status": true,
"status_message": "The active session of the user was successfully retrieved."
}
Response Codes
HTTP Status Code | Description | Message |
---|---|---|
401 | Unauthorized | - |
200 | OK | The active session of the user was successfully retrieved. |