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.{ "sender": { "id": "PSID", }, "recipient": { "id": "PAGE-ID", }, "timestamp": "TIMESTAMP", "optin": { "type": "notification_messages", "payload": "ADDITIONAL-INFORMATION", "notification_messages_token": "NOTIFICATION-MESSAGES-TOKEN", "notification_messages_frequency": "FREQUENCY", "notification_messages_timezone": "TIMEZONE-ID", "token_expiry_timestamp": "TIMESTAMP", "user_token_status": "TOKEN-STATUS", "notification_messages_status": "NOTIFICATION-STATUS", "title": "TITLE" } }
optin| Property | Description |
|---|---|
payloadstring | Additional information that you want to include in the webhooks notification |
title string | The title displayed in the template |
notification_messages_tokenstring | The token that represents the person who opted in, with the specific topic and message frequency, that is used to send Marketing Messages |
notification_messages_frequency enum { DAILY, WEEKLY, MONTHLY } | The value can be one of the following:
(Removed in API v16) |
notification_messages_timezone string | Timezone for the person receiving the message |
notification_messages_status enum { STOP NOTIFICATIONS, RESUME NOTIFICATIONS } | This field is present only when the user stops or resumes Marketing Messages.
The value can be one of the following:
|
token_expiry_timestampunix timestamp | Date when the the notification message token expires |
type string | Value must be notification_messages |
user_token_status enum { REFRESHED, NOT_REFRESHED } | The value can be one of the following:
|