GetUser

更新时间:
复制 MD 格式

You can invoke GetUser to obtain the agent information corresponding to a specified agent ID under a specified instance.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request parameters

Parameter

Type

Required

Description

Example

InstanceId

string

Yes

Instance ID.

ccc-test

UserId

string

No

Agent ID. This parameter is optional. You must specify either UserId or Extension.

agent@ccc-test

Extension

string

No

Agent extension number. This parameter is optional. You must specify either UserId or Extension.

8003****

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.

EEEE671A-3E24-4A04-81E6-6C4F5B39DF75

Data

object

Data.

DisplayName

string

Agent display name.

坐席小王

DisplayId

string

Agent's employee ID.

1001

Extension

string

Agent extension number.

8003****

LoginName

string

Agent logon name.

agent

Email

string

Mailbox.

username@example.com

WorkMode

string

Work mode.

Valid values:

  • ON_SITE :

    On-site mode

  • OFF_SITE :

    Off-site mode

  • OFFICE_PHONE :

    Office phone mode

ON_SITE

Mobile

string

Agent's personal phone number.

1391234****

UserId

string

Agent ID.

agent@ccc-test

RoleName

string

Role name.

Valid values:

  • Agent :

    Agent

  • Admin :

    Administrator

  • Manager :

    Skill Group Leader

Admin

InstanceId

string

Instance ID.

ccc-test

RoleId

string

Role ID, in the format: role@instance ID.

Admin@ccc-test

DeviceId

string

Device ID, which is the identity of a browser-based Web Real-Time Communication (WebRTC) softphone or a physical phone device. Only one type of device can be registered at a time.

ACC-YUNBS-1.0.10-****

DeviceExt

string

SIP phone extension number. If the agent has registered a SIP phone, this parameter is the extension number of the SIP phone device.

8033****

DeviceState

string

The status of the SIP phone device. If no SIP phone is registered, the status is UNREGISTERED (Unregistered). If a SIP phone was previously registered but is currently offline, the status is OFFLINE (Offline). If a SIP phone is registered and currently online, the status is ONLINE (Online).

Valid values:

  • UNREGISTERED :

    Unregistered

  • OFFLINE :

    Offline

  • ONLINE :

    Online

OFFLINE

Nickname

string

Agent nickname

阿云

AvatarUrl

string

Agent profile picture URL.

http://xxx.com/xxx.jpg

Params

array

Extension parameters.

string

Response parameters.

Examples

Success response

JSON format

{
  "Code": "OK",
  "HttpStatusCode": 200,
  "Message": "无",
  "RequestId": "EEEE671A-3E24-4A04-81E6-6C4F5B39DF75",
  "Data": {
    "DisplayName": "坐席小王",
    "DisplayId": "1001",
    "Extension": "8003****",
    "LoginName": "agent",
    "Email": "username@example.com",
    "WorkMode": "ON_SITE",
    "Mobile": "1391234****",
    "UserId": "agent@ccc-test",
    "RoleName": "Admin",
    "InstanceId": "ccc-test",
    "RoleId": "Admin@ccc-test",
    "DeviceId": "ACC-YUNBS-1.0.10-****",
    "DeviceExt": "8033****",
    "DeviceState": "OFFLINE",
    "Nickname": "阿云",
    "AvatarUrl": "http://xxx.com/xxx.jpg"
  },
  "Params": [
    "无"
  ]
}

Error codes

HTTP status code

Error code

Error message

Description

404 NotExists.InstanceId The specified instance %s does not exist.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.