GetLoginDetails
Invoke GetLoginDetails to obtain the agent's logon information, including basic agent information, server address information, authentication information, and more. This API can only be invoked by the agent themselves; administrators are not permitted to invoke it on behalf of others.
Try it now
Test
RAM authorization
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| InstanceId |
string |
Yes |
Instance ID. |
ccc-test |
| UserId |
string |
No |
Agent ID. This parameter is optional. If not specified, the agent mapped to the current RAM account is used by default. |
agent@ccc-test |
| ChatDeviceId |
string |
No |
Chat Device ID. |
4c51c9116c36537cb850dc1081d745df |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| Code |
string |
Response code. |
OK |
| HttpStatusCode |
integer |
HTTP status code. |
200 |
| Message |
string |
Response message. |
无 |
| RequestId |
string |
Request ID. |
F1A4774A-F28B-5C40-AEF6-D88D2DD6C7E4 |
| Params |
array |
Response parameters. |
|
|
string |
Response parameters. |
无 |
|
| Data |
object |
Logon information data. |
|
| DisplayName |
string |
Agent display name. |
坐席小王 |
| Extension |
string |
Agent extension number. |
8001**** |
| Signature |
string |
Signature information generated using an asymmetric key encryption algorithm. This information is required for authentication when registering with the SIP server. |
zi31STIMtIfa/UN2l+6lww**** |
| SipServerUrl |
string |
SIP registration server URL. The agent must register with the server as an SIP user to perform transactional processing (TP) operations. |
sh-sip-ccc.aliyuncs.com:443 |
| DeviceId |
string |
If the agent has registered an SIP phone, this parameter is the Device ID of the SIP phone device; otherwise, it is empty. |
Yealink SIP-T23G 44.84.XX.XX |
| AgentServerUrl |
string |
Agent data push server URL. After a successful connection, the server pushes agent status data to the agent Workbench. |
sh-wss-ccc.aliyuncs.com |
| UserId |
string |
Agent ID. |
agent@ccc-test |
| UserKey |
string |
Signature data used to generate signature information. Because this signature mechanism does not support Chinese characters, UserKey2 is currently used for signing instead. |
坐席@aliyun:802001:1656406628862 |
| WorkMode |
string |
Work mode. Valid values:
|
ON_SITE |
| UserKey2 |
string |
Signature data used to generate signature information. UserKey2 was added because UserKey does not support Chinese characters in signatures. |
802001:1656406628862" |
| Signature2 |
string |
Signature information generated using an asymmetric key encryption algorithm. This information is required for authentication when registering with the SIP server. |
zi31STIMtIfa/UN2l+6lww**** |
| DeviceExt |
string |
SIP device extension number. This field is required when using a SIP phone. |
8033**** |
| DeviceState |
string |
SIP device status. Valid values:
|
OFFLINE |
| ChatUserId |
string |
Chat session Device ID. |
A-8000100x |
| ChatDeviceId |
string |
Chat Device ID. |
4c51c9116c36537cb850dc1081d745df |
| ChatLoginToken |
string |
Chat session logon token. |
{"accessToken":"oauth_cloud_key:4xxx0=","accessTokenExpiredTime":864xxxx,"refreshToken":"oauth_cloud_key:Paxxxx=="} |
| ChatAppId |
string |
Chat session application ID. |
7pjxxx |
| ChatAppKey |
string |
Chat session application key. |
955e4bd7xxxxxxxxxxxxxd7898ba9fa0d0 |
| ChatServerUrl |
string |
Chat session server URL. |
wss://wss.im.dingtalk.cn |
| Nickname |
string |
Agent nickname |
老王 |
| AvatarUrl |
string |
Agent profile picture URL. |
http://abc.com/sam.jpb |
Examples
Success response
JSON format
{
"Code": "OK",
"HttpStatusCode": 200,
"Message": "无",
"RequestId": "F1A4774A-F28B-5C40-AEF6-D88D2DD6C7E4",
"Params": [
"无"
],
"Data": {
"DisplayName": "坐席小王",
"Extension": "8001****",
"Signature": "zi31STIMtIfa/UN2l+6lww****",
"SipServerUrl": "sh-sip-ccc.aliyuncs.com:443",
"DeviceId": "Yealink SIP-T23G 44.84.XX.XX",
"AgentServerUrl": "sh-wss-ccc.aliyuncs.com",
"UserId": "agent@ccc-test",
"UserKey": "坐席@aliyun:802001:1656406628862",
"WorkMode": "ON_SITE",
"UserKey2": "802001:1656406628862\"",
"Signature2": "zi31STIMtIfa/UN2l+6lww****",
"DeviceExt": "8033****",
"DeviceState": "OFFLINE",
"ChatUserId": "A-8000100x",
"ChatDeviceId": "4c51c9116c36537cb850dc1081d745df",
"ChatLoginToken": "{\"accessToken\":\"oauth_cloud_key:4xxx0=\",\"accessTokenExpiredTime\":864xxxx,\"refreshToken\":\"oauth_cloud_key:Paxxxx==\"}",
"ChatAppId": "7pjxxx",
"ChatAppKey": "955e4bd7xxxxxxxxxxxxxd7898ba9fa0d0",
"ChatServerUrl": "wss://wss.im.dingtalk.cn",
"Nickname": "老王",
"AvatarUrl": "http://abc.com/sam.jpb"
}
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 404 | NotExists.InstanceId | The specified instance %s does not exist. | |
| 404 | NotExists.UserId | The user %s does not exist in instance %s. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.