Opt-in Callback

This callback will occur when the Send to Messenger plugin has been tapped, or when a user has accepted a message request using Customer Matching.

When using the plugin, the optin.ref parameter is set by the data-ref field on the "Send to Messenger" plugin. This field can be used by the developer to associate a click event on the plugin with a callback.

You can subscribe to this callback by selecting the messaging_optins field when setting up your webhook.

Example

{
  "sender":{
    "id":"USER_ID"
  },
  "recipient":{
    "id":"PAGE_ID"
  },
  "timestamp":1234567890,
  "optin":{
    "ref":"PASS_THROUGH_PARAM"
  }
}    

Fields

optin object

Field Name Description Type

ref

data-ref parameter that was defined with the entry point

String