Get Token Information¶
Get information about the user who is currently logged-in through the access token.
Operation Permissions¶
Users need to log in to EnOS Application Portal and select an OU.
Request Format¶
GET https://{apigw-address}/app-portal-service/v2.2/session/info
Request Parameters (Header)¶
Name |
Mandatory/Optional |
Data Type |
Description |
---|---|---|---|
Authorization |
Mandatory |
String |
The access token (or bearer token). The format of the parameter’s string is Bearer {your token}. Refer to Log In or Refresh Access Token to learn how to get the access token. |
Response Parameters¶
Name |
Data Type |
Description |
---|---|---|
data |
Data Struct |
The details of the user who is currently logged-in. For more information, see Data Struct |
Data Struct¶
Name |
Data Type |
Description |
---|---|---|
userId |
String |
The user ID. |
userName |
String |
The user name. |
currentOrgId |
String |
The current organization ID. |
currentOrgName |
String |
The current organization name. |
Error Codes¶
Code |
Message |
Description |
---|---|---|
31401 |
Please login first |
Login first to get valid Access Token |
31512 |
Organization unselected |
Selecting an OU is required |
Samples¶
Request Sample¶
url: https://{apigw-address}/app-portal-service/v2.2/session/info
headers: {"Authorization":"yourBearerToken"}
method: GET
Return Sample¶
{
"code": 0,
"message": "OK",
"data": {
"userId": "your_user_id",
"userName": "your_user_name",
"currentOrgId": "your_org_id",
"currentOrgName": "your_org_name"
}
}