Get the Current User
Gets the details of the current user.
Request URL
GET {base_url}/uc-user/api/v1/users/current/user
Request parameters
- Headers
-
Parameter Required Type Description Authorization Yes String The access token used for authentication. Format: Bearer
{access_token}.
Response parameters
| Parameter | Type | Description |
|---|---|---|
| requestId | String | The unique ID of the request, which can be used to quickly locate the request. |
| code | String | The HTTP status code of the request.
|
| message | String | The status message of the request. |
| detailMessage | String | The detailed error information. When the request is successful, this parameter returns empty. |
| result | Object<User_Detail> | The details of the current user. |
- User_Detail
-
Parameter Type Description id String The ID of the user. ucId String The UC ID of the company that the user belongs to. email String The email address. username String The username, which is used for login. company String The company name. region String The region that the user belongs to. country String The country name synchronized from PP, such as United States. tenantCode String The code of the tenant that the user belongs to. userType String The type of the user:
P_ACCOUNT: The platform user.T_USER: The tenant user.
subType String The sub type of the user:
SUPER: The super administrator.ADMIN: The administrator.RESELLER: The reseller.
This parameter is valid only for P_ACCOUNT.
isPrimaryAccount Boolean Whether the account is a primary account. true indicates a primary account, and false indicates a colleague account. ownerId Integer The ID of the primary account. This parameter is returned only for colleague accounts of P_ACCOUNT and points to the primary account. roleId Integer The role ID. boundUserId Integer The ID of the bound tenant user. This parameter is valid only for P_ACCOUNT and stores the ID of the bound T_USER. boundAccountId Integer The ID of the bound platform account. This parameter is valid only for T_USER and stores the ID of the bound P_ACCOUNT. extension String The extension number. This parameter is valid only for T_USER and is extracted from the part before @ in the username (extCode@tenantCode). isTenantAdmin Boolean Whether the user is a tenant administrator. This parameter is true when the user has the tenant administrator role (role ID 102). status String The status of the account. nickname String The nickname of the user. firstName String The first name of the user. lastName String The last name of the user. lastLoginTime Integer The time of the last login, in Unix timestamp format (milliseconds). createTime Integer The time when the account was created, in Unix timestamp format (milliseconds). updateTime Integer The time when the account was last updated, in Unix timestamp format (milliseconds). tenantOemId Integer The default OEM ID used when creating a tenant. The value 0 indicates the standard edition. mfaEnabled Boolean Whether MFA (2FA) is enabled. profileImage String The URL of the avatar (a permanent public link of the resource).
Example
Request example
GET /uc-user/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o2_N4xP7bEvcZ5HT1Qy2s1yW42jk5kkvjfhUFfrvZcswoFuuLuw870ngG_ahD95xV7A
Response example
HTTP/1.1 200 OK { "result": { "id": "2085315948849827842", "ucId": "2085315948287791106", "email": "mt1000@mailstar.top", "username": "mt1000@mailstar.top", "company": "", "userType": "P_ACCOUNT", "subType": "ADMIN", "isPrimaryAccount": true, "status": "ACTIVE", "firstName": "Admin", "lastName": "Admin", "createTime": 1786013040167, "updateTime": 1792051622537, "tenantOemId": 84, "mfaEnabled": false }, "requestId": "9caafb5defdb9b2c21bb2994bf334a7d", "code": "200", "message": "SUCCESS" }