JSON API for LINE
You can make many kinds of HTTP requests for your bot to analyze your backend and send responses.
To be specific, you can run:
Create dynamic messages
Execute “postbacks”
Obtain and set up user arguments (coming soon)
Redirecting to other messages (coming soon)
Response reference
We will parse the JSON response and send a message to the customer based on the response. For more information, please visit https://developers.line.biz/en/reference/messaging-api/
Sending Text
The response below will send text to a customer.
{
"messages": [
{
"type": "text",
"text": "Welcome to the smartest bot building tool ever —— YOCTOL.AI"
},
{
"type": "text",
"text": "what kind of bot do you want to build?"
}
]
}Sending Image
Image formats of JPG are supported as messages from JSON requests.
Sending Video
The following response is an example of using a video as message. Currently, LINE only supports MP4 files with size less than 10MB and time less than 1 minute.
Sending Voice Messages
The following response will send a voice message file. Currently, LINE only supports memo files with size less than 10MB, less than 1 minute and extensions of M4A.
Sending Sticker
The following response will send a sticker.
Sending Buttons
The following response will send a button template. You can manually set up the actions for each button, for example prompting to another website. For more usages of buttons, visit https://developers.line.biz/en/reference/messaging-api/#buttons
You can also send special buttons for actions, such as open camera.
Sending Quick Reply
The following response provides text with quick reply buttons.
Last updated
Was this helpful?