StartChat

更新时间:
复制 MD 格式

Starts a chat session.

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

No

The instance ID.

ccc-test

UserList

array<object>

Yes

The information about chat members.

object

No

UserId

string

No

The member ID.

fcd020fe-d8e4-40e5-8c77-1a272a174a7d

UserType

string

No

The type of the member.

  • AGENT: An agent.

  • CUSTOMER: A visitor.

CUSTOMER

AvatarUrl

string

No

The URL of the member's profile picture.

http://xxx.com/image

Nickname

string

No

The nickname of the member.

访客-1a272a174a7d

Token

string

No

The channel token for the web service.

9XYGTGWtq2wFi_Bpg7aUnIoYi_vG_rO3bjEn0YtsxbHRHrYHlz1LDBLJAyZcLxieRQR4h_6AnWvTjJeNU5jg************Hwej7WgWrmA=

AccessChannelId

string

No

The ID of the web service channel.

cf584733-***-***-9699-cb77aa3b7aa6

Response elements

Element

Type

Description

Example

object

Code

string

The response code.

OK

HttpStatusCode

integer

The HTTP status code.

200

Message

string

The response message.

RequestId

string

The request ID.

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

Data

object

The response data.

ChatConversationId

string

The ID of the chat session.

$23086709$EAUNIT

JobId

string

The job ID.

chat-525523618219921408

Examples

Success response

JSON format

{
  "Code": "OK",
  "HttpStatusCode": 200,
  "Message": "无",
  "RequestId": "EEEE671A-3E24-4A04-81E6-6C4F5B39DF75",
  "Data": {
    "ChatConversationId": "$23086709$EAUNIT",
    "JobId": "chat-525523618219921408"
  }
}

Error codes

HTTP status code

Error code

Error message

Description

400 Parameter.Blank The parameter %s must not be null.
400 Parameter.Empty The parameter %s must not be null or empty.
400 Parameter.Format The format of parameter %s is invalid.
400 Parameter.Null The parameter %s must not be null.
404 NotExists.InstanceId The specified instance %s does not exist.
409 AlreadyExists.SkillGroup The skill group %s already exists in instance %s.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.