This event is sent to your server when a player sends a message from the mobile application.
Event name: messages@new
⚠️ Response required / expires after 60 seconds
| Key | Type | Description |
|---|---|---|
custom_id | string | Unique identifier from your services (1-64 characters) |
cid | string | Unique content-id generated by iPear |
payload | IncomingMessagePayload | Message payload |
You need to emit an event with the following name and data:
Response event name: messages@new/state
| Key | Type | Extra | Description |
|---|---|---|---|
cid | string | required | Unique content-id generated by iPear |
success | boolean | required | Message is added to your database and sent to the recipient |
recipient_online | boolean | required | Tell us if the recipient is online. If he's not, we send a notification to the recipient |
Important
Response object must respect every type rule. If any structure isn't respected, your request will be rejected for "bad-request".
My response will be:
{
"cid": "5f8f3ad37363fffa11b33566404611c4",
"success": true,
"recipient_online": false
}
Outgoing events
Powered by Doctave