Skip to content

Commit 193ea5c

Browse files
Documentation edits made through Mintlify web editor
1 parent 5b6168d commit 193ea5c

File tree

2 files changed

+9
-27
lines changed

2 files changed

+9
-27
lines changed

x-api/account-activity/migrate/overview.mdx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ This guide helps you migrate from the legacy Enterprise Account Activity API to
55
### Summary of Changes
66

77
* **API Format**: Endpoints use the /2/account\_activity/ base path instead of /1.1/account\_activity/.
8-
* **Webhook Management**: Webhook creation, listing, validation (CRC), and deletion are handled by the [V2 Webhooks API](https://developer.x.com/en/docs/webhooks).
8+
* **Webhook Management**: Webhook creation, listing, validation (CRC), and deletion are handled by the [V2 Webhooks API](https://github.com/m-rosinsky/XWebhookTest/blob/main/app.py).
99
* **Authentication**: V2 endpoints require either:
1010
* **OAuthUser** (3-legged OAuth) for user-specific actions (e.g., subscribing a user).
1111
* **OAuth2 App Only** (Bearer Token) for app-level actions (e.g., listing/deleting subscriptions).
@@ -14,10 +14,10 @@ This guide helps you migrate from the legacy Enterprise Account Activity API to
1414

1515
| V1.1 Endpoint | V2 Equivalent / Action | Notes |
1616
| ----- | ----- | ----- |
17-
| POST /1.1/account\_activity/webhooks.json?url=\<URL\> | POST /2/webhooks | [Docs](https://developer.x.com/en/docs/webhooks). Requires OAuth2AppOnly. |
18-
| GET /1.1/account\_activity/webhooks.json | GET /2/webhooks | [Docs](https://developer.x.com/en/docs/webhooks). Requires OAuth2AppOnly. |
19-
| PUT /1.1/account\_activity/webhooks/:webhook\_id.json | PUT /2/webhooks/:webhook\_id | Triggers CRC. [Docs](https://developer.x.com/en/docs/webhooks). Requires OAuth2AppOnly. |
20-
| DELETE /1.1/account\_activity/webhooks/:webhook\_id.json | DELETE /2/webhooks/:webhook\_id | [Docs](https://developer.x.com/en/docs/webhooks). Requires OAuth2AppOnly. |
17+
| POST /1.1/account\_activity/webhooks.json?url=\<URL\> | POST /2/webhooks | [Docs](https://docs.x.com/x-api/webhooks/introduction). Requires OAuth2AppOnly. |
18+
| GET /1.1/account\_activity/webhooks.json | GET /2/webhooks | [Docs](https://docs.x.com/x-api/webhooks/introduction). Requires OAuth2AppOnly. |
19+
| PUT /1.1/account\_activity/webhooks/:webhook\_id.json | PUT /2/webhooks/:webhook\_id | Triggers CRC. [Docs](https://docs.x.com/x-api/webhooks/introduction). Requires OAuth2AppOnly. |
20+
| DELETE /1.1/account\_activity/webhooks/:webhook\_id.json | DELETE /2/webhooks/:webhook\_id | [Docs](https://docs.x.com/x-api/webhooks/introduction). Requires OAuth2AppOnly. |
2121
| POST /1.1/account\_activity/webhooks/:webhook\_id/subscriptions/all.json | POST /2/account\_activity/webhooks/:webhook\_id/subscriptions/all | Requires OAuthUser. |
2222
| GET /1.1/account\_activity/subscriptions/count.json | GET /2/account\_activity/subscriptions/count | Requires OAuth2AppOnly. |
2323
| GET /1.1/account\_activity/webhooks/:webhook\_id/subscriptions/all.json | GET /2/account\_activity/webhooks/:webhook\_id/subscriptions/all | Requires OAuthUser. |
@@ -27,7 +27,7 @@ This guide helps you migrate from the legacy Enterprise Account Activity API to
2727

2828
* **Response Formats**: Review the success and error response structures in the AAAPI documentation.
2929

30-
When migrating, update your code to use the new base paths, adjust authentication flows, and manage webhooks using the [V2 Webhooks API](https://developer.x.com/en/docs/webhooks).
30+
When migrating, update your code to use the new base paths, adjust authentication flows, and manage webhooks using the [V2 Webhooks API](https://docs.x.com/x-api/webhooks/introduction).
3131

3232
### How to Migrate
3333

@@ -46,7 +46,7 @@ When migrating, update your code to use the new base paths, adjust authenticatio
4646
* Client ID and Client Secret.
4747
* **Verify or Reconfigure Your Webhook**:
4848
* Use your existing webhook URL or set up a new one (e.g., https://your\_domain.com/webhook/twitter).
49-
* Follow the [V2 Webhooks API documentation](https://developer.x.com/en/docs/webhooks) to register and manage your webhook.
49+
* Follow the [V2 Webhooks API documentation](https://docs.x.com/x-api/webhooks/introduction) to register and manage your webhook.
5050
* **Sample Apps:**
5151
* [Simple webhook server](https://github.com/m-rosinsky/XWebhookTest/blob/main/app.py)
5252
* A single python script that shows you how to respond to the CRC check and accept POST events.

x-api/webhooks/introduction.mdx

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,5 @@
11
# V2 Webhooks API
22

3-
[V2 Account Activity API](#v2-webhooks-api)
4-
5-
[Overview](#overview)
6-
7-
[Feature summary](#feature-summary)
8-
9-
[Manage Webhooks](#manage-webhooks)
10-
11-
[1\. Develop A Webhook Consumer App](#1.-develop-a-webhook-consumer-app)
12-
13-
[2\. Securing Webhooks](#2.-securing-webhooks)
14-
15-
[3\. The Webhooks API](#3.-the-webhooks-api)
16-
17-
[4\. The CRC Check](#4.-the-crc-check)
18-
19-
---
20-
213
## Overview
224

235

@@ -49,7 +31,7 @@ There are several details that need attention before you can start receiving web
4931

5032
In order to register a new webhook associated with your X app, you’ll need to develop, deploy and host a web app that receives X webhook events, and responds to our security requests.
5133

52-
*Before you get started, we recommend checking out our [sample apps](#sample-apps)\!*
34+
*Before you get started, we recommend checking out our [sample apps](https://github.com/xdevplatform/account-activity-dashboard-enterprise/tree/master)\!*
5335

5436
* Create a web app with a publicly accessible HTTPS URL that will act as the webhook endpoint to receive events. 
5537
* The URI *path* is completely up to you. This example would be valid: [https://mydomain.com/service/listen](https://mydomain.com/service/listen)
@@ -96,7 +78,7 @@ Starting local HTTP server to handle requests from ngrok tunnel (forwarded from
9678

9779
* See example code:
9880

99-
* [Enterprise Account Activity API Setup](https://github.com/m-rosinsky/XWebhookTest), a node web app that displays webhook events using the enterprise tier of the Account Activity API.
81+
* [Account Activity API Setup](https://github.com/m-rosinsky/XWebhookTest), a node web app that displays webhook events using the enterprise tier of the Account Activity API.
10082

10183
### 2\. Securing Webhooks
10284

0 commit comments

Comments
 (0)