Get User Information


获取当前用户的信息。

前提条件


用户已登录应用门户,并进入一个 OU。如有需要,可通过 Log In API 登录应用门户,通过 Choose Organization API 选择 OU。

请求格式


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

响应参数


名称

数据类型

描述

id

String

用户的 ID。

name

String

用户名。

domain

String

域名称。

description

String

用户描述。

nickName

String

用户昵称。

phoneArea

String

用户注册电话的区号。

phone

String

用户的注册手机号码。

email

String

用户的注册邮箱。

createdTime

String

用户账户创建时间。

joinTime

String

用户加入当前 OU 的时间。

type

Integer

用户账号类型。0 表示用户账号为应用门户中注册的账号,1 表示用户账号为第三方域账号。

updatedTime

String

用户账号的更新时间。

company

string

用户的公司。

department

string

用户的部门。

position

string

用户的职位。

错误码


代码

错误信息

描述

31401

Please login first

请先登录,获取正确的 Access Token。

31512

Organization unselected

登录后请先选择 OU。

示例

请求示例


url: https://{apigw-address}/app-portal-service/v2.2/user/info
headers: {"Authorization":"Bearer your_token"}
method: GET

返回示例


{
  "code": 0,
  "message": "",
  "data": {
    "id": "your_user_id",
    "name": "your_user_name",
    "domain": "",
    "description": "",
    "nickName": "",
    "phoneArea": "",
    "phone": "",
    "email": "your_user_email",
    "createdTime": "2022-05-27 04:33:30.0",
    "type": 0,
    "company": "",
    "department": "",
    "position": ""
  }
}