# Message

## Send t**ext message**

| Name                                          | Parameters Description                                                                                                                                                                          | Response       |
| --------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------- |
| `sendTextMessage(roomId,body,txnId,callback)` | <ul><li><code>roomId</code>: room id</li><li><code>body</code>: message content string</li><li><code>txnId</code> (optional)：transaction id</li><li><code>callback</code> (optional):</li></ul> | <p>N/A<br></p> |

## **Send image**

| Name                                               | Parameters Description                                                                                                                                                                                                                    | Response       |
| -------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------- |
| `sendImageMessage(roomId,url,info,txnId,callback)` | <ul><li><code>roomId</code>: room id</li><li><code>url</code>: image url</li><li><code>info</code> (optional): image information</li><li><code>txnId</code> (optional)：transaction id</li><li><code>callback</code> (optional):</li></ul> | <p><br>N/A</p> |

## **Send notice**

| Name                                     | Parameters Description                                                                                                                                                                      | Response       |
| ---------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------- |
| `sendNotice(roomId,body,txnId,callback)` | <ul><li><code>roomId</code>: room id</li><li><code>body</code>: notice text string</li><li><code>txnId</code> (optional)：transaction id</li><li><code>callback</code> (optional)：</li></ul> | <p><br>N/A</p> |

## Get history message

| Name                                                   | Parameters Description                                                                                                                                                                                                                                                                                                                                     | Response                                  |                                                                                                                                                                            |
| ------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `createMessagesRequest(roomId, fromToken, limit, dir)` | <ul><li><code>roomId</code>: room id</li><li><code>fromToken</code>: Pagination identifier, pass an empty string for the first time, and pass the 'end' field returned from the previous call for subsequent calls.</li><li><code>limit</code> : number of events per page returned by the backend API.</li><li><code>dir</code> : direction, value is "b" | "f", where b: back, f: forward.</li></ul> | <p><br><code>end</code>: pagination identifier, if not returned, indicates completion of retrieval.<br><code>chunk</code>: retrieved event data, returned as an array.</p> |
|                                                        |                                                                                                                                                                                                                                                                                                                                                            |                                           |                                                                                                                                                                            |
