Query a Specific YCM User
Query the detailed information of a specific YCM user.
Request URL
GET {base_url}/dm/open_api/v1/users/{userId}
Request parameters
Path parameter
Parameter | Required | Type | Description |
---|---|---|---|
userId | Yes | Long | The ID of the YCM user. Note: You can
query the user ID using Query All the YCM Users. |
Headers
Parameter | Required | Type | Description |
---|---|---|---|
Authorization | Yes | String | Pass the access token in the header. Format: Bearer {access_token}. |
Response parameters
Parameter | Type | Description |
---|---|---|
data | Object <Details> | The detailed information. |
requestId | String | The unique ID of the request, which can be used to quickly locate the request. |
status | String | Request result:
|
time | Long | The response time. Note: The YCM API response returns a
timestamp, you can convert the timestamp to detailed
date and time as needed. For more information, see Convert Timestamp to Local Date and Time.
|
Details
Parameter | Type | Description |
---|---|---|
userId | Long | The ID of the YCM user. |
company | String | Company name. |
firstName | String | First name. |
lastName | String | Last name. |
String | Email. | |
phone | String | Phone number. |
mobile | String | Mobile number. |
address | String | Address. |
remark | String | Remark. |
createdCloudPbx | Integer | The
number of created PBXs. Note: If
the user type is
Hosting User ,
this parameter returns the total number of PBXs
created by the hosting user, the hosting user's
colleagues, the hosting user's resellers, and the
resellers' colleagues. |
createdReseller | Integer | The number of resellers created by the hosting user. Note: This parameter is only returned when
the user type is Hosting
User . |
userType | String | User type.
|
Example
Request example
Query the information of a YCM user (ID: 13123).
GET /dm/open_api/v1/users/13123 HTTP/1.1
Host: ycm.yeastar.com
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjdXN0b21Kd3RQYXlsb2FkSW5mbyI6eyJncmFudFR5cGUiOiJjbGllbnRfY3JlZGVudGlhbHMiLCJ5c0lkIjoxNzg5NjM2MDM5MDg1MDI1NzM0OSwidmVyc2lvbiI6MTYzODk1OTkwOSwicmVmcmVzaFZlcnNpb24iOjE2Mzg5NjI4NDB9LCJzY29wZSI6WyJhbGwiXSwiZXhwIjoxNjM4OTY0NjQwLCJhdXRob3JpdGllcyI6WyJST0xFX0NMSUVOVCJdLCJqdGkiOiJmZjBiNWM1MS03YjBhLTQwYjYtYTRkNS04ZWZkMzY1OGJlZDkiLCJjbGllbnRfaWQiOiJrcDl5eW50bXVlc3VrNWpvV3ZNa1RiQ0J4cU82TEtSaCJ9.RNiea7bNZtBO5QWvnChhK8m-Bcg_qSZY5gods0Gq7z0
Response example
HTTP/1.1 200 OK
{
"data": {
"userId": 13123,
"company": "Yeastar",
"firstName": "Leo",
"lastName": "Ball",
"email": "leo@example.com",
"phone": "13988888888",
"address": "USA",
"createdCloudPbx": 10,
"createdReseller": 3,
"userType": "Hosting User"
},
"requestId": "a3a2876051d863c3d30431ba8bee42c8",
"status": "Success",
"time": 1664343275
}