Quick Replies

Quick replies provide a way to present a set of buttons in-conversation for users to reply with. A maximum of 13 quick replies are supported and each quick reply allows up to 20 characters before being truncated. Quick replies only support plain text.

When a quick reply is tapped, the buttons are dismissed, and the title of the tapped button is posted to the conversation as a message. A messages event will be sent to your webhook that contains the button title and an optional payload.

This feature is currently not available on desktop.

Sending Quick Replies

curl -X POST -H "Content-Type: application/json" -d '{
  "recipient":{
    "id":"<IGSID>"
  },
  "messaging_type": "RESPONSE",
  "message":{
    "text": "<SOME_TEXT>",
    "quick_replies":[
      {
        "content_type":"text",
        "title":"<TITLE_1>",
        "payload":"<POSTBACK_PAYLOAD_1>"
      },
      {
        "content_type":"text",
        "title":"<TITLE_2>",
        "payload":"<POSTBACK_PAYLOAD_2>"
      }
    ]
  }
}' "https://graph.facebook.com/<API_VERSON>/me/messages?access_token=<PAGE_ACCESS_TOKEN>"

Webhook Event

When a quick reply is tapped, a text message will be sent to your message webhook.

The text property of the event will correspond to the title of the Quick Reply. The message object will also contain a field named quick_reply containing the payload data on the Quick Reply.

{
  "object": "instagram",
  "entry": [
    {
      "id": "<IGID>",
      "time": 1502905976963,
      "messaging": [
        {
          "sender": {
            "id": "<IGSID>"
          },
          "recipient": {
            "id": "<IGID>"
          },
          "timestamp": 1502905976377,
          "message": {
            "quick_reply": {
              "payload": "<PAYLOAD>"
            },
            "mid": "<MID>",
            "text": "<SOME_TEXT>"
          }
        }
      ]
    }
  ]
}

User Phone Number Quick Reply


The user phone number quick reply allows you to ask a user for their phone number. When the phone number quick reply is sent, the Instagram Direct Platform will automatically pre-fill the displayed quick reply with the phone number from the user's profile information.

If the user's profile does not have a phone number, the quick reply will not be shown.

The bot will not receive the phone number until the user clicks the quick reply.

Choosing the quick reply transmits the information once and does not constitute permission to access the information in the future.

Syntax

{
  "content_type":"user_phone_number"
}

Webhook Event

When the user taps the quick reply, the email address will be passed in the payload attribute of the messages webhook event.

{
  "object": "page",
  "entry": [
    {
      "id": "<PAGE_ID>",
      "time": 1502905976963,
      "messaging": [
        {
          "sender": {
            "id": "<IGSID>"
          },
          "recipient": {
            "id": "<IGID>"
          },
          "timestamp": 1502905976377,
          "message": {
            "quick_reply": {
              "payload": "<PHONE_NUMBER>"
            },
            "mid": "<MESSAGE_ID>",
            "text": "<PHONE_NUMBER>"
          }
        }
      ]
    }
  ]
}

Developer Support