Twitter Direct Messages

The main difference to other channels is the fact that Twitter uses the so-called Twitter snowflake as an identifier for a sender and a recipient.

Media message

See also receiving media messages

The support and restrictions for media files are the same as for sending Twitter direct messages.

  • Twitter GIFs will be received as MP4 videos

Media files send by Twitter users will be hosted behind CM authentication as it may contain sensitive information of the user.

In order to download these media files, your request towards the provided media url should contain the X-CM-PRODUCTTOKEN header with your product token as its value.
As a registered user, you can find your product token on our platform in the Channels app or for older SMS accounts in the Gateway app.

❗️

Warning

Your product token is private information and should never be incorporated into webpages and/or mobile applications where it can be exposed to 3rd parties.

Suggestions

When the customer clicks on an item in a quick reply suggestion list, the reply will have the original action, and the original postbackData in the custom/suggestions item:

"custom: "{
  "suggestions": [
    {
      "action": "Reply",
      "postbackData": "EDIT_APPOINTMENT"
    }
  ]
}

Example message

{
  "reference": "my-reference",
  "messageContext": "",
  "from": {
    "number": "87654321",
    "name": "@JohnDoe"
  },
  "to": {
    "number": "12345678"
  },
  "message": {
    "text": "I want to edit my appointment",
    "media": {
      "mediaUri": "",
      "contentType": "",
      "title": ""
    },
    "custom": {
      "suggestions": [
        {
          "action": "Reply",
          "postbackData": "EDIT_APPOINTMENT"
        }
      ]
    }
  },
  "groupings": ["", "", ""],
  "time": "2021-05-27 13:01:27",
  "timeUtc": "2021-05-27T11:01:27",
  "channel": "Twitter"
}