Q&A

[Messaging API] Send multiple messages using line-bot-sdk-python

I use line sdk python https://github.com/line/line-bot-sdk-python, How to send multiple messages in one request? I see that it's possible in Line Documentation but I cannot find it in the line-bot-sdk-ptyhon

  • 0
  • 2
  • 3321
  • twitter facebook

Hello,

Could you share the relevant documentation?

  • 0

Here's https://developers.line.biz/en/reference/messaging-api/#send-reply-message If you can see in shell, it have a message key with an array value,

curl -v -X POST https://api.line.me/v2/bot/message/reply \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer {channel access token}' \
-d '{
    "replyToken":"nHuyWiB7yP5Zw52FIkcQobQuGDXCTA",
    "messages":[
        {
            "type":"text",
            "text":"Hello, user"
        },
        {
            "type":"text",
            "text":"May I help you?"
        }
    ]
}'

but if you change it to python, it only send one text which is 'Hello world'. I want to know if that's possible using line-bot-sdk-python? Or should I create http request manually?

  • 0

関連する質問

    関連する質問はありません

本当によろしいですか? question.vm