Get Token Information


Get information about the user who is currently logged-in through the access token.

Prerequisites


The user has logged in to Application Portal and entered an OU. You can log in to Application Portal through the Log In API and select the OU through the Choose Organization API.

Request Format


GET https://{apigw-address}/app-portal-service/v2.2/session/info

Request Parameters (Header)


Name

Required/Optional

Data Type

Description

Authorization

Required

String

The access token generated after the user logs in and selects the OU, represented by Bearer Token, is in the form of Bearer {your token}. You can call the Log In or Refresh Access Token API to obtain the access token.

Response Parameters


Name

Data Type

Description

userId

String

The user ID.

userName

String

The user name.

currentOrgId

String

The current OU ID.

currentOrgName

String

The current OU 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

method: GET

headers: {"Authorization":"Bearer your_token"}

Return Sample


{
  "code": 0,
  "message": "OK",
  "data": {
    "userId": "your_user_id",
    "userName": "your_user_name",
    "currentOrgId": "your_org_id",
    "currentOrgName": "your_org_name"
  }
}