Start Story/Media Block from API

Written by Saad Rawasia
Posted On May, 29, 2020
In this tutorial, we will see how you start a story or media block from API response. First, we need to fetch the payload of the story or media block. Get Story Payload:
  1. On the side, the menu clicks Chatbot AI and selects Story.
  2. Click on the Menu option of the story and click Copy Payload.
After copying the payload goto your API, after you have performed the login you can return the payload as follows and the chatbot will start that particular flow directly after the API call:

return {"story_postback": “STORY_ID-123”}

Please paste your original payload instead of “STORY_ID-123”. Get Media Block Payload:
  1. On the side, the menu clicks Chatbot AI and selects Media Blocks.
  2. Click on the Actions option and click Copy Payload.
After copying the payload goto your API, after you have performed the login you can return the payload as follows and the chatbot will send the particular media block directly after the API call:

return {"template_postback": “TEMPLATE_ID-123”}

Please paste your original payload instead of “TEMPLATE_ID-123”.