Set Up Webhooks for Threads

Webhooks for Threads allow you to receive real-time notifications for the subscribed topics and fields.

Receive Live Webhook Notifications

To receive live Webhook notifications, the following conditions must be satisfied:

  • Your app must have Threads Webhooks added as a sub-use case and appropriate fields subscribed to in the App Dashboard.
  • For non-tech providers, the apps must be in Live Mode.
  • For tech providers, the apps must have permissions with an Advanced Access level. You can request Advanced Access for permissions as shown here:

If the app permissions don't have an access level of Advanced Access, the app won't receive Webhook notifications.

  • The app user must have granted your app appropriate permissions (threads_basic, threads_read_replies).
  • The business connected to the app must be verified.
  • The owner of the media object upon which the reply appears must not have set their account to private.

Limitations

  • Apps don't receive Webhook notifications if the Media where the reply appears was created by a private account.
  • Your app must have successfully completed App Review (Advanced Access) to receive Webhooks notifications for the replies Webhooks field.

Step 0: [Optional] Use the sample app to test your integration

Download the Webhooks sample app to test your integration.

Step 1: Add the Webhooks sub-use case to the main Threads API use case

Under Use Cases > Customize > Settings, add the Get real-time notifications with Threads Webhooks sub-use case.

Step 2: Create an endpoint and configure Threads webhooks

Create an endpoint that accepts and processes Webhooks. To add the configuration

  1. Select Moderate Topic and click Subscribe to this object.
  2. Set the callback URL and token.

The token here is passed to your server defined in the callback URL to allow verification that the call originates from Meta servers.

Fields

NameDescription

replies

Replies on a Threads Media owned by the Threads install user.
Required permissions: threads_basic, threads_read_replies

Common Uses

Realtime reply notifications

If you subscribe to the replies field, we send your endpoint a Webhook notification containing the reply object.

Sample Replies Payload

{
    "app_id": "123456",
    "topic": "moderate",
    "target_id": "78901",
    "time": 1723226877,
    "subscription_id": "234567",
    "has_uid_field": false,
    "values": {
        "value": {
            "id": "8901234",
            "username": "test_username",
            "text": "Reply",
            "media_type": "TEXT_POST",
            "permalink": "https:\/\/www.threads.net\/@test_username\/post\/Pp",
            "replied_to": {
                "id": "567890"
            },
           "root_post": {
               "id": "123456",
               "owner_id": "123456",
               "username": "test_username_2"
           },
            "shortcode": "Pp",
            "timestamp": "2024-08-07T10:33:16+0000"
        },
        "field": "replies"
    }
}