There are a few ways to communicate when using Rocket.Chat, as described below.
The most basic (and more common) way to communicate is through plain text. You're going to use the sendMessage
method and send a single parameter: the message
.
The sendMessage
is described as:
_id
: The message idrid
: The room id for where to send this messagemsg
: The message body (the text of the message itself)
{
"msg": "method",
"method": "sendMessage",
"id": "42",
"params": [
{
"_id": "message-id",
"rid": "room-id",
"msg": "Hello World!"
}
]
}
For sending a file we now recommend using the rest api: