messaging_handovers Webhook Event Reference

The messaging_handovers webhook event is used to notify your webhook when certain actions are taken using the Messenger Platform's handover protocol, including pass thread control, take thread control, and role change events.

For more information on the handover protocol, see Handover Protocol.

Contents

pass_thread_control

This callback will occur when thread ownership for a user has been passed to your application.

For details on implementing pass thread control, see Pass Thread Control.

{
  "sender":{
    "id":"<PSID>"
  },
  "recipient":{
    "id":"<PAGE_ID>"
  },
  "timestamp":1458692752478,
  "pass_thread_control":{
    "new_owner_app_id":"123456789",
    "metadata":"Additional content that the caller wants to set"
  }
}

Properties

sender

PropertyTypeDescription

id

String

The PSID of the user that triggered the webhook event.

recipient

PropertyTypeDescription

id

String

Your Page ID.

pass_thread_control

PropertyTypeDescription

new_owner_app_id

String

App ID that thread control is passed to.

metadata

String

Custom string specified in the API request.

take_thread_control

This callback will occur when thread ownership for a user has been taken away from your application.

For details on implementing take thread control, see Take Thread Control.

{
  "sender":{
    "id":"<USER_ID>"
  },
  "recipient":{
    "id":"<PSID>"
  },
  "timestamp":1458692752478,
  "take_thread_control":{
    "previous_owner_app_id":"123456789",
    "metadata":"additional content that the caller wants to set"
  }
}

Properties

sender

PropertyTypeDescription

id

String

The PSID of the user that triggered the webhook event.

recipient

PropertyTypeDescription

id

String

Your Page ID.

take_thread_control

PropertyTypeDescription

previous_owner_app_id

String

App ID that thread control was taken from.

metadata

String

Custom string specified in the API request.

app_roles

This callback will occur when a page admin changes the role of your application. An app can be assigned the roles of primary_receiver or secondary_receiver.

For information on assigning app roles, see Assign App Roles.

{
  "recipient":{
    "id":"<PSID>"
  },
  "timestamp":1458692752478,
  "app_roles":{
    "123456789":["primary_receiver"]
  }
}  
    

Properties

sender

PropertyTypeDescription

id

String

The PSID of the user that triggered the webhook event.

recipient

PropertyTypeDescription

id

String

Your Page ID.

app_roles

PropertyTypeDescription

id

String

Your Page ID.