Messages format


 

Sending text

Use this response for sending text messages. url, node and call buttons can be used with text message. The "buttons", "actions", "quick_replies" properties are optional.

{ "version": "v1", "content": { "messages": [ { "type": "text", "text": "simple text with button", "buttons": [ { "type": "url", "caption": "External link", "url": "https://uchat.com.au" } ] } ], "actions": [], "quick_replies": [] } }

 

Sending image

This response is used to send image files. Messenger supports JPG, PNG and GIF images. You can use url, call and node buttons. The "buttons", "actions", "quick_replies" properties are optional.

{ "version": "v1", "content": { "messages": [ { "type": "image", "url": "https://example.comxxxxxxzzzzzzzzz.png", "buttons": [] } ], "actions": [], "quick_replies": [] } }

 

Sending video file

This response is used to send video files. Messenger supports videos, which are up to 25MB in size. You can use url, call and node buttons. The "buttons", "actions", "quick_replies" properties are optional.

{ "version": "v1", "content": { "messages": [ { "type": "video", "url": "https://example.com/xxxxxxzzzzzzzzz.mpg", "buttons": [] } ], "actions": [], "quick_replies": [] } }

 

Sending audio file

This response is used to send audio files. Messenger supports audio, which are up to 25MB in size. You can use url, call and node buttons. The "buttons", "actions", "quick_replies" properties are optional.

 

Sending files

This response is used to send any other files, which are no larger than 25 MB. The "actions", "quick_replies" properties are optional.

 

Sending gallery cards

This response is used to send a horizontal scrollable gallery. You can use url, call and node buttons. The "action_url", "buttons", "actions", "quick_replies" properties are optional.

action_url - URLs starting with HTTP may not open in some browsers. We strongly suggest to use HTTPS protocol for your URLs.\ image_aspect_ratio - The aspect ratio used to render cards. You can use horizontal or square (default horizontal).