Instagram Messaging

Instagram uses a numeric identifier for a sender and recipient. So-called "Instagram Scoped User ID (IGSID)" for the sender and a "Instagram account ID" for the recipient of the event. A person is assigned a unique IGSID for each Instagram Business account they start a conversation with.

These identifiers are visible in the CM.com platform as the userid below channels...Instagram.

MessageDelete

This event occurs when a message is deleted by the end-user on Instagram.

Example MessageDelete event

{
    "from": {
        "number": "<IGSID>"
    },
    "to": {
        "number": "<IGID>"
    },
    "event": {
        "type": "MessageDelete",
        "reference": "453563216"
    },    
    "timeUtc": "2021-07-05T17:08:45",
    "channel": "Instagram"
}

StoryMention

An Instagram business account can be notified when a user mentions them in a story.

Note A Story mentioning webhook will only flow in if the user mentioning the business has their account setup as public. Story mentions from a private account will only flow in if the business follows the said account.

Example StoryMention event

{
    "from": {
        "number": "<IGSID>"
    },
    "to": {
        "number": "<IGID>"
    },
    "event": {
        "type": "StoryMention",
        "reference": "453563217",
        "custom": {
               "url": "<CDN_URL>"
        }
    },
    "timeUtc": "2021-07-05T17:08:45",
    "channel": "Instagram"
}