1

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.

1 Answers1

1

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.

ranusharao
  • 1,826
  • 1
  • 8
  • 17
  • Thank you. I wll see the documentation and I will write here about this issue. – Leandro Duarte Aug 19 '19 at 19:32
  • Hi @ranusharao, I am sorry for the delay in replying. I am using the Direct Line channel and there is a limit as you said. Do you have any solution to exceed the size limit for Direct Line? – Leandro Duarte Sep 16 '19 at 12:09
  • Hello @LeandroDuarte, one way is to send multiple attachments by upload.Refer to [this](https://learn.microsoft.com/en-us/azure/bot-service/rest-api/bot-framework-rest-direct-line-3-0-send-activity?view=azure-bot-service-4.0#upload-multiple-attachments) documentation on how to do. – ranusharao Sep 24 '19 at 21:08
  • Hello @ranusharao, I am on this way. The bot is sending many messages to front end. The sent messages are 299kb. – Leandro Duarte Sep 26 '19 at 11:49