Large Interactive Messages

When a response payload exceeds 10KB, Messages for Business saves the full JSON to a cloud server and the MSP receives an Interactive Data Reference (IDR). The IDR has URLs to retrieve the full response payload and decryption keys to decipher the response. The response that your MSP receives is an IDR (implied by the interactiveDataRef key): Receiving an Interactive Message

A List Picker response includes all of the images of the original picker. Therefor the payload will most likely exceed 10KB. This ensures that the response JSON has a complete set of digital assets to render the bubble, images, user selection, and future interaction.

Your messaging platform needs to parse the IDR and use it to download the full JSON response. Use the full JSON to complete the action of interactive message.

Exercise: Retrieve a Large Message Using an Interactive Data Reference

In this exercise, you'll learn how to decrypt, decode, and parse a data reference resulting from a user's response to an interactive message.

Perform the following tasks on your test server:

  1. Locate the code zip folder and unzip it.
  2. Locate and run the 12_large_interactive_message.py file to set up the listener.
  3. Go through the Exercise: Sending a List Picker with Multiple Images to send a list picker to your test device.
  4. On your test device, make your selections, enter a text message, and send it.
  5. Observe the interaction between your MSP and the Messages for Business service.
  6. Open the file data_reference_debug.json in your favorite text editor to see the full payload retrieved by script.

If your custom message doesn't show on your user's device and the message type is Custom Interactive Messages, then the reply message's text and picture don't appear in the UI because a response message wasn't generated. The response message's text and picture are encoded as an attachment rather than an IDR.