User Details
Method for retrieving detailed information about a user in Liner by their identifier.
Endpoint and method
GET /v2/user/detail/{userId}/
userId
User identifier in Liner. Value> 0
Request example
<?php
$host = 'https://YOUR_LINER_API_HOST';
$token = 'YOUR_API_TOKEN';
$userId = (int)$userId;
$ch = curl_init($host . '/v2/user/detail/' . $userId);
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Content-Type: application/json',
'X-Api-Key: ' . $token,
],
CURLOPT_TIMEOUT => 15,
]);
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
if ($response === false) {
throw new RuntimeException('cURL error: ' . curl_error($ch));
}
curl_close($ch);
echo "HTTP {$httpCode}\n";
echo $response;
const host = "https://YOUR_LINER_API_HOST";
const token = "YOUR_API_TOKEN";
const userId = Number(userId);
const res = await fetch(`${host}/v2/user/detail/${userId}`, {
method: "GET",
headers: {
"Content-Type": "application/json",
"X-Api-Key": token
}
});
const data = await res.json();
console.log("HTTP", res.status, data);
Response example
{
"success": true,
"message": "",
"data": {
"id": 123,
"name": "John",
"lastName": "Doe",
"secondName": null,
"email": "[email protected]",
"isActive": true,
"accessGroup": "call-center",
"webRtcEnabled": true,
"interfaceLanguageCode": "ru",
"languageSkillCodes": ["ru"],
"autoAnswer": 0,
"phoneMode": "default",
"avatarUrl": null,
"telegramNotificationsEnabled": false,
"telegramChatId": null,
"telegramNotificationsType": null,
"emailNotificationsEnabled": false,
"emailNotificationsType": null,
"lastLoginAt": "2024-01-01T00:00:00Z",
"lastActivityAt": "2024-01-01T00:00:00Z",
"createdAt": "2024-01-01T00:00:00Z"
}
}
Response fields
| Field | Type | Description |
|---|---|---|
id |
int |
User identifier in Liner. |
name |
string |
User first name. |
lastName |
string |
User last name. |
secondName |
string | null |
User middle name. |
email |
string |
User email. |
isActive |
bool |
Whether the user is active. |
accessGroup |
string |
User access group. Available values: client, call-center, call-center-senior, arbitration, moderator, admin. |
webRtcEnabled |
bool |
Whether telephony is enabled for the user. |
interfaceLanguageCode |
string |
User interface language code. Available values: ru, gb. |
languageSkillCodes |
array |
Language codes the user speaks. Allowed item values: ru, gb. |
autoAnswer |
int |
Settings for auto-answer. Possible values range from -1 to 10, where -1 means Instant, 0 means Disabled, and all other values specify the number of seconds before auto-answer. |
phoneMode |
string |
User telephony mode. Available values: default, outgoing-only, incoming-only, predictive |
avatarUrl |
string | null |
User avatar URL. |
telegramNotificationsEnabled |
bool |
Whether Telegram notifications are enabled. |
telegramChatId |
string | null |
Telegram chat ID for notifications. |
telegramNotificationsType |
string | null |
Telegram notification type. Available values: null, urgent |
emailNotificationsEnabled |
bool |
Whether email notifications are enabled. |
emailNotificationsType |
string | null |
Email notification type. Available values: null, urgent |
lastLoginAt |
string |
Last login date and time (ISO 8601). |
lastActivityAt |
string |
Last activity date and time (ISO 8601). |
createdAt |
string |
User creation date and time (ISO 8601). |
Note
The structure of the data field is described above. For the overall API response format, see Request Schema