GetUserByToken

Updated at:

Retrieves user information using the provided access token.

Important

The new Qoder CN documentation site is now available. Content on this site may not reflect the latest product features and changes. Visit docs.qoder.cn for the latest product documentation.

Supported editions

Enterprise Dedicated Edition, Enterprise Standard Edition

Service endpoints

Get the service endpoint and replace {domain} in the API request syntax with your endpoint.

Authorization

Product

Resource

Required permission

organization settings

User

Read-only

Request syntax

GET https://{domain}/oapi/v1/platform/user

Request

Enterprise standard edition

Example request

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

Enterprise dedicated edition

Example request

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

Request headers

x-yunxiao-token string (Required)

The access token. See Access token for details.

Example: pt-0fh3****0fbG_35af****0484.

Request parameters

None

Response parameters

Response example

{
    "createdAt": "2025-05-16T22:44:50.048Z",
    "email": "test****@example.com",
    "id": "99d1****6124",
    "lastOrganization": "99d1****6124",
    "name": "Example User",
    "staffId": "123****",
    "sysDeptIds": ["99d1****6124"],
    "username": "demo**username"
}

createdAt string

The timestamp of user creation.

email string

The email address of the user.

id string

The user ID.

lastOrganization string

The ID of the organization the user last accessed.

name string

The display name of the user.

staffId string

The employee ID.

sysDeptIds array[string]

An array of the user's department IDs.

username string

The login name of the user.

Error codes

For more information, see Error code center.