Mesibo Backend APIs - Messaging
Estimated reading time: 1 minuteWhile your users can send messages to each other or groups using Mesibo real-time APIs, your backend can also send messages to one of your users or groups using backend API.
To send a message, you need to send a message JSON request to the backend API, for example:
{
"op": "message",
"token": "ptlk9hdel1gqxf3p0s15f5f5gtusldej18tl794suzit",
"message": {
"from": "me",
"to": "you,she,he",
"gid": 111,
"type": 0,
"expiry": 3600,
"flags": null,
"forced": true,
"message": "This is my message"
}
}
- op = “message”
- token = Application Token obtained from mesibo console
- message.from = From Address [MUST be a valid user]
- message.to = To Addresses, command separated
- message.gid = Group ID [Optional]
- message.type = Message Type [Optional]
- message.expiry = Expiry in seconds, default 1 year [Optional]
- message.when = Schedule after
when
seconds [Optional], default 0 (now) - message.message = Message
If the request is successful, the response will be like,
{
"op":"message",
"result":true
}