Use this response to send image files. Messenger supports JPG, PNG and GIF images. If you are having issues with GIF rendering, please try to reduce the file size. Example: http://www.mocky.io/v2/5c18d25d2f00000f00af11c3
Use this response to send a horizontal scrollable gallery. Each item is composed of an image attachment, short description and buttons to request input from the user. Note: messenger_extensions should only be added if you are using Messenger Extensions. Example: http://www.mocky.io/v2/5c18d35e2f00006400af11c8
Use this JSON function to add buttons to your responses. You can set buttons to link to a block in the dashboard, open a website, or send another request to your backend. Buttons are limited to 3 items per message. Example: http://www.mocky.io/v2/5c18d9f12f00006200af11fb
{
"messages": [
{
"attachment": {
"type": "template",
"payload": {
"template_type": "button",
"text": "Hello!",
"buttons": [
{
"type": "show_block",
"block_name": "name of block",
"title": "Show Block"
},
{
"type": "web_url",
"url": "https://ahachat.com",
"title": "Visit Website"
},
{
"type": "web_url",
"url": "https://fb.com/groups/ahachat",
"title": "Visit Group"
}
]
}
}
}
]
}
You can also use the Call button, this button dials a phone number when selected.
You can also save attributes and tags from the user's options. For example, if the user clicks on Show Block, he will save 1 to the attribute number, and if the user clicks on Visit Website, he will save 2 to the attribute number. Example: http://www.mocky.io/v2/5c19b5453200000e0064ad03
You can also save attributes and tags from the user's options. For example, if the user clicks on Show Block, he will save 1 to the attribute number, and if the user clicks on Visit Website, he will save 2 to the attribute number. Example: http://www.mocky.io/v2/5c18dbee2f00004e00af1216
Use this JSON function to set user attributes without the user having to click any buttons. (Note that if the number type does not have a "" symbols, for example: "number": 1) Example: http://www.mocky.io/v2/5c19ce9c320000550064ad4e
<TOKEN> — The unique secret token for each bot. You can find and reset this token in the Settings menu at any time.
<USER_ID> — {{messenger_user_id}} of the subscriber you want to send the broadcast to.
<BOT_ID> — ID of the bot you want to send messages from.
<AHACHAT_MESSAGE_TAG> — The facebook message tag gives you the ability to send messages outside 24h, so the default is NON_PROMOTIONAL_SUBSCRIPTION. See the full list of message tags here.
<BLOCK_NAME> — The block name you want to send to the subscriber.
<USER_ATTRIBUTE>=<VALUE> — The name and value of the user attribute you want to save when sending the message.