Sending Image-Text Messages
# Description
Send image-text messages.
# Request Specification
Method: POST + application/json
Endpoint: https://${Cloud Domain}/cgi/message/send?thirdTraceId=${Random String}
Headers: Refer to Common Parameters
# Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| toUser | List | Yes | Open Platform employee ID list (message recipients, currently supports up to 500 users) |
| msgType | String | Yes | Message type, value: articles |
| articles | List | Yes | List of image-text entries (maximum 7 messages per request) |
| articles.title | String | Yes | Title, maximum 45 characters |
| articles.author | String | No | Author, maximum 8 characters |
| articles.description | String | No | Summary, maximum 140 characters. |
| articles.coverImage | String | Yes | mediaId of the cover image |
| articles.coverImageInContent | Boolean | No | When articles.type is "TEXT", whether to display the image in content (false: exclude, true: include, defaults to false) |
| articles.type | String | Yes | Image-text message content type ("TEXT","URL") |
| articles.content | String | Yes | Image-text message content (represents URL when imageTextType is "URL"). |
# Request Example
{
"toUser":[
"TOUSER1",
"TOUSER2"
],
"msgType":"articles",
"articles":[
{
"title":"This is a title",
"author":"Author",
"description":"This is a sample article",
"coverImage":"mediaId",
"coverImageInContent":true,
"type":"TEXT",
"content":"This is the article content"
},
{
"title":"This is a title",
"author":"Author",
"description":"This is a redirect sample",
"coverImage":"mediaId",
"type":"URL",
"content":"www.aaa.com"
}
]
}
# Response Parameters
| Parameter | Type | Description |
|---|---|---|
| traceId | string | Unique request ID |
| errorDescription | string | Error description |
| errorMessage | string | Error message |
| errorCode | Int | Error Codes |
# Response Example
{
"traceId": "E-O.827xxxxxx",
"errorDescription": "success",
"errorMessage": "OK",
"errorCode": 0
}
# Notes
- Do not use the message field in the response for logical judgment as errorMessage may change;