JSON API is an advanced component providing powerful flexibility and functionality. With JSON API, you can connect your bot to a backend service, completing a highly flexible responses.
You can make many kinds of HTTP requests for your bot to analyze your backend and make the appropriate responses.
{
"messages": [
{ "text": "Welcome to the smartest bot building tool ever —— YOCTOL.AI" },
{ "text": "what kind of bot do you want to build?" }
]
}
Sending Image
Image formats of JPG, PNG and GIF are supported as messages from JSON requests.
You can also send out messages of Facebook pictures so you won’t need to upload the image again.
Sending Video
The following response is an example of using a video as message. Currently, Messenger only supports MP4 files with size less than 25MB.
You can also use existing Facebook video posts as messages!
Sending Voice Memos
The following response will send a voice memo file. Currently, Messenger only supports memo files under 25MB of size with extensions of MP3, OCG, and WAV.
Sending Files
The following response will prompt a file as message. Messenger at the moment only supports files under 25MB with no restricted file type.
Sending Carousels
The following response will create a carousel message. Please note that every element of the carousel includes an image, a description, and a button.