Custom response beyond text, buttons, and image

With LINE messaging API, you can send responses more than just text, buttons, and image such as stickers, flex. How to create a custom response since the output channel only supports text, buttons, image.

You want to customize the json output format yourself to align with whatever the chat client you want your chatbot to be.

There are many ways to achieve this, but I’d recommend:

  1. Custom JSON output so that it has required information for what ever your SDK needs to generate the UI (e.g. sticker’s code/url).

You can do this by using dispatcher.utter_message() See document for parameter name elements or custom_json.

  1. In your SDK client for the channel, say LINE, you want to recognize your own unique JSON and then parse required information and call corresponding API, e.g. sticker reply API.

Hope this helps.