मुख्य सामग्री पर जाएं
POST
/
2
/
activity
/
subscriptions
X एक्टिविटी सदस्यता बनाएँ
curl --request POST \
  --url https://api.x.com/2/activity/subscriptions \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "event_type": "profile.update.bio",
  "filter": {
    "keyword": "The President",
    "user_id": "2244994945"
  },
  "tag": "<string>",
  "webhook_id": "1146654567674912769"
}
'
{
  "data": {
    "total_subscriptions_for_instance_id": 123
  },
  "errors": [
    {
      "title": "<string>",
      "type": "<string>",
      "detail": "<string>",
      "status": 123
    }
  ],
  "meta": {
    "total_subscriptions": 123
  }
}

प्राधिकरण

Authorization
string
header
आवश्यक

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

बॉडी

application/json
event_type
enum<string>
आवश्यक
उपलब्ध विकल्प:
profile.update.bio,
profile.update.profile_picture,
profile.update.banner_picture,
profile.update.screenname,
profile.update.geo,
profile.update.url,
profile.update.verified_badge,
profile.update.affiliate_badge,
news.new,
follow.follow,
follow.unfollow,
chat.received,
chat.sent,
ProfileBioUpdate,
ProfilePictureUpdate,
ProfileBannerPictureUpdate,
ProfileScreennameUpdate,
ProfileGeoUpdate,
ProfileUrlUpdate,
ProfileVerifiedBadgeUpdate,
NewsNew,
FollowFollow,
FollowUnfollow
filter
object
आवश्यक

एक XAA सदस्यता।

tag
string
Required string length: 1 - 200
webhook_id
string

इस webhook कॉन्फ़िगरेशन का अद्वितीय पहचानकर्ता।

Pattern: ^[0-9]{1,19}$
उदाहरण:

"1146654567674912769"

प्रतिक्रिया

अनुरोध सफल रहा है।

data
object
errors
object[]
Minimum array length: 1

IETF RFC 7807 (https://tools.ietf.org/html/rfc7807) में परिभाषित एक HTTP Problem Details ऑब्जेक्ट।

meta
object