post https://api.meya.ai/button
Trigger a button click event from an interactive card in your custom app
Use this endpoint to simulate a button click. Use the message_id and the button payload (found at data["card"]["buttons"][idx]) as the callback when a user clicks on a button.
This endpoint is useful when integrating buttons into your own custom app.
Button validationThe
text,action,flow,data,typemust be consistent with the original button constructed in your flow.
Example webhook payload containing a button
Tip: Use the button JSON as the payloadYou can take the button JSON payload and use as the params of the endpoint.
{
"user_id": "1234567890",
"sender": "bot",
"text": "Pick your favorite football player [messi] [ronaldo]",
"timestamp": 1491526647.888284,
"type": "card",
"message_id": "MkyL77cf0qmpHpZtr",
"card": {
"buttons": [
{
"messenger_extensions": null,
"url": null,
"text": "Lionel Messi",
"flow": null,
"webview_height_ratio": null,
"image_url": null,
"type": "transition",
"action": "messi",
"data": {
"age": 29
},
"fallback_url": null
},
{
"messenger_extensions": null,
"url": null,
"text": "Cristiano Ronaldo",
"flow": null,
"webview_height_ratio": null,
"image_url": null,
"type": "transition",
"action": "ronaldo",
"data": {
"age": 32
},
"fallback_url": null
}
],
"text": "Pick your favorite football player",
"type": "text_buttons",
"mode": "default"
},
"bot_id": "BJty7evfw2b"
}