GetUser - 查询用户信息

通过 OpenAPI 查询用户信息。

适用版本

企业专属版

服务接入点

获取服务接入点,替换 API 请求语法中的 {domain}

授权信息

产品

资源

所需权限

组织管理

用户

只读

请求语法

GET https://{domain}/oapi/v1/platform/users/{idOrUsername}

请求说明

通过 id 查询用户信息

curl -X 'GET' \
  'https://test-domain-***.rdc.aliyuncs.com/oapi/v1/platform/users/029844f4-46cb-47b0-9db4-06c68eaf****' \
  -H 'Content-Type: application/json' \
  -H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484'

通过 Username 查询用户信息

curl -X 'GET' \
  'https://test-domain-***.rdc.aliyuncs.com/oapi/v1/platform/users/doc-test1' \
  -H 'Content-Type: application/json' \
  -H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484'

请求头(Headers)

x-yunxiao-token string (必选)

个人访问令牌。您可参考个人访问令牌获取。

示例:pt-0fh3****0fbG_35af****0484。

请求参数

idOrUsername string 必选

用户 ID 或登录账号名。

只需传入一种即可。

返回参数

返回示例

{
    "id": "029844f4-46cb-47b0-9db4-06c68eaf****",
    "username": "doc-test1",
    "name": "文档测试用户 1",
    "nickName": "昵称 1",
    "email": "doc-test1@example.com",
    "staffId": "1",
    "lastOrganization": "c7655445-143f-4466-9724-8b371a21****",
    "createdAt": "2025-06-13T05:41:36Z"
}

id string

用户 ID。

username string

登录账号名。

name string

显示名称。

nickName string

昵称。

email string

邮箱。

staffId string

工号。

lastOrganization string

上次登录组织。

createdAt string

创建时间。

错误码

访问错误码中心查看 API 相关错误码。