Search code examples
botframeworklimitmessage

Can bot send messages over 300kb to user?


I am creating a message to send to user from bot. The type is data and size is at about 1mb. When I am using bot emulator the message works, but when I publish my bot the message doesn't work. The Badrequest error is returned.

My question is: Is it possible to send messages over 300kb from bot to user?

Thank you so much for your attention.


Solution

  • There is no set size limit within the bot framework itself as this is dependent on the channels. You will have to refer to the respective channel API documentation to know about the message size limits.

    • The documentation on message length for Microsoft Teams can be found here.

    • For the Direct Line channel, he total size of the activity, when serialized to JSON, must not exceed 300K characters.The file size limit or the attachment limit is 4MB.

    • For Facebook Messenger,the text message must be UTF-8 and has a 2000 character limit.