When a message is received or sent via the webhook integration
You can subscribe to bot
and user
message text
events.
Use-cases:
- creating your own custom app integration
- testing and other advanced use-cases
{
"user_id": "Uxxxxxxxxxx",
"sender": "user",
"timestamp": 1487101585.943187,
"text": "hi",
"type": "text",
"bot_id": "BJty7evfw2b"
}
{
"user_id": "Uxxxxxxxxxx",
"sender": "bot",
"timestamp": 1487101587.398373,
"text": "Hello, World!",
"type": "text",
"bot_id": "BJty7evfw2b"
}
User initiated messages
If you would like to also receive user-initiated messages, you'll have to enable that setting in your webhook. In the case of a user initiated message
sender
will come in asuser
rather thanbot
.
Subscribe to all messaging channels
If you're a Pro customer you can subscribe to message events from all channels including Facebook Messenger, Meya Web, Twitter DM, etc. This can be useful for archiving transcripts in real-time.