Skip to main content

User Message Received

Description

The Chat API allows users to send messages to your bot. All message types, excluding
files, are supported for sending from user to bot, including text, picture, video, contact,
URL, and location.

Event Payload

The event payload is a JSON object with the following properties:

Example
{
"event": "message",
"timestamp": 1457764197627,
"sender": {
"id": "jc9HsWTZ2Yf2NkRZ8KcNug==",
"name": "John McClane",
"avatar": "http://avatar.example.com",
"country": "UK",
"language": "en",
"api_version": 1
},
"message": {
"type": "text",
"text": "a message to the service",
"media": "http://example.com",
"location": {
"lat": 50.76891,
"lon": 6.11499
},
"tracking_data": "tracking data"
},
"message_token": 4912661846655238145
}
PropertyDescriptionNotes
eventThe event name.Always message
timestampThe time the event was triggered.Unix timestamp in milliseconds
senderThe subscriber object.See Subscriber Object
messageThe message object.See Message Object
message_tokenUnique ID of the message