Dm User Updates

GET/tw-v2/interaction/dm-user-updates

Description

Poll for new DM updates and changes. Use the cursor from inbox-initial-state or previous dm-user-updates response to check for new messages, conversations, and updates. Ideal for real-time DM monitoring.

Parameters

ParameterTypeRequiredDescription
authTokenstringrequiredAccount authentication token (auth_token cookie value)
cursorstringrequiredUpdate cursor from inbox-initial-state or previous dm-user-updates response. Required for polling.
proxystringoptionalOptional proxy in format 'host:port@user:pass'

Code Examples

const params = new URLSearchParams({
  authToken: 'YOUR_AUTH_TOKEN',
  cursor: 'UPDATE_CURSOR_HERE'
});

const response = await fetch(`https://api.tweetapi.com/tw-v2/interaction/dm-user-updates?${params}`, {
  method: 'GET',
  headers: {
    'X-API-Key': 'YOUR_API_KEY'
  }
});

const data = await response.json();
console.log(data);

Response

Success Response (200 OK)

200
{
  "messages": [
    {
      "id": "9003983800335676473",
      "conversationId": "1000000000000000001-1000000000000000002",
      "senderId": "1000000000000000002",
      "recipientId": "1000000000000000001",
      "text": "Sample post text 05814 for documentation.",
      "createdAt": "2024-01-30T11:30:00.000Z",
      "requestId": "90064759-0000-0000-0000-900257883985",
      "editCount": 0
    },
    {
      "id": "9001391839799285341",
      "conversationId": "1000000000000000002-5002247610892258097",
      "senderId": "9001569368885517319",
      "recipientId": "1000000000000000002",
      "text": "Sample post text 80540 for documentation.",
      "createdAt": "2024-01-30T12:00:00.000Z",
      "requestId": "90018442-0000-0000-0000-900134183329",
      "editCount": 0,
      "entities": {
        "urls": [
          {
            "url": "https://example.com/link-72694",
            "expandedUrl": "https://example.com/investment",
            "displayUrl": "example.com/investment"
          }
        ],
        "mentions": [],
        "hashtags": []
      }
    }
  ],
  "conversations": [
    {
      "id": "1000000000000000001-1000000000000000002",
      "type": "ONE_TO_ONE",
      "participants": [
        "1000000000000000001",
        "1000000000000000002"
      ],
      "lastMessageId": "5005463647063278908",
      "lastMessageTime": "2024-01-30T11:30:00.000Z",
      "lastReadMessageId": "5001284882584811901",
      "trusted": true,
      "muted": false,
      "readOnly": false,
      "lowQuality": false,
      "nsfw": false,
      "notificationsDisabled": false
    },
    {
      "id": "1000000000000000002-5007338668997589419",
      "type": "ONE_TO_ONE",
      "participants": [
        "1000000000000000002",
        "3000000000000000001"
      ],
      "lastMessageId": "5001777349635958333",
      "lastMessageTime": "2024-01-30T12:00:00.000Z",
      "lastReadMessageId": "0",
      "trusted": false,
      "muted": false,
      "readOnly": false,
      "lowQuality": false,
      "nsfw": false,
      "notificationsDisabled": false
    }
  ],
  "users": [
    {
      "id": "1000000000000000001",
      "username": "user_one",
      "name": "Sample User 46694",
      "bio": "Sample description for documentation 43558.",
      "location": null,
      "website": null,
      "pinnedTweetIds": [],
      "avatar": "https://example.com/images/sample-avatar-29517.jpg",
      "banner": null,
      "profileImageShape": null,
      "verified": false,
      "isBlueVerified": false,
      "verifiedType": null,
      "verifiedSince": null,
      "isIdentityVerified": false,
      "isProtected": false,
      "possiblySensitive": false,
      "profileInterstitialType": null,
      "withheldInCountries": [],
      "professional": null,
      "businessAccount": null,
      "creatorSubscriptionsCount": 0,
      "hasHiddenSubscriptions": false,
      "highlightsInfo": null,
      "hasGraduatedAccess": false,
      "isProfileTranslatable": false,
      "hasCustomTimelines": false,
      "isTranslator": false,
      "affiliatesHighlightedLabel": null,
      "defaultProfile": false,
      "defaultProfileImage": false,
      "followerCount": 100,
      "followingCount": 50,
      "tweetCount": 0,
      "listedCount": 0,
      "mediaCount": 0,
      "favoritesCount": 0,
      "createdAt": "2020-01-01T00:00:00.000Z"
    },
    {
      "id": "1000000000000000002",
      "username": "user_two",
      "name": "Sample User 13614",
      "bio": "Sample description for documentation 30386.",
      "location": null,
      "website": null,
      "pinnedTweetIds": [],
      "avatar": "https://example.com/images/sample-avatar-29600.jpg",
      "banner": null,
      "profileImageShape": null,
      "verified": false,
      "isBlueVerified": false,
      "verifiedType": null,
      "verifiedSince": null,
      "isIdentityVerified": false,
      "isProtected": false,
      "possiblySensitive": false,
      "profileInterstitialType": null,
      "withheldInCountries": [],
      "professional": null,
      "businessAccount": null,
      "creatorSubscriptionsCount": 0,
      "hasHiddenSubscriptions": false,
      "highlightsInfo": null,
      "hasGraduatedAccess": false,
      "isProfileTranslatable": false,
      "hasCustomTimelines": false,
      "isTranslator": false,
      "affiliatesHighlightedLabel": null,
      "defaultProfile": false,
      "defaultProfileImage": false,
      "followerCount": 200,
      "followingCount": 150,
      "tweetCount": 0,
      "listedCount": 0,
      "mediaCount": 0,
      "favoritesCount": 0,
      "createdAt": "2020-02-01T00:00:00.000Z"
    },
    {
      "id": "1006283874534263200",
      "username": "spam_user_one",
      "name": "Sample User 05071",
      "bio": "Sample profile bio for Sample User 05071.",
      "location": null,
      "website": "https://example.com/profile-05071",
      "pinnedTweetIds": [],
      "avatar": "https://example.com/images/sample-avatar-05071.jpg",
      "banner": null,
      "profileImageShape": null,
      "verified": false,
      "isBlueVerified": false,
      "verifiedType": null,
      "verifiedSince": null,
      "isIdentityVerified": false,
      "isProtected": false,
      "possiblySensitive": false,
      "profileInterstitialType": null,
      "withheldInCountries": [],
      "professional": null,
      "businessAccount": null,
      "creatorSubscriptionsCount": 0,
      "hasHiddenSubscriptions": false,
      "highlightsInfo": null,
      "hasGraduatedAccess": false,
      "isProfileTranslatable": false,
      "hasCustomTimelines": false,
      "isTranslator": false,
      "affiliatesHighlightedLabel": null,
      "defaultProfile": false,
      "defaultProfileImage": false,
      "followerCount": 10,
      "followingCount": 5000,
      "tweetCount": 0,
      "listedCount": 0,
      "mediaCount": 0,
      "favoritesCount": 0,
      "createdAt": "2024-01-15T00:00:00.000Z"
    }
  ],
  "cursor": "GRwm5ILd5ZzonfM2FoLE3cGWpLzzNiUEAAA",
  "lastSeenEventId": "9001536030064760316",
  "minEntryId": "9007599858500427158",
  "maxEntryId": "9001583205518383921"
}

API Playground

GET/tw-v2/interaction/dm-user-updates

Sensitive Credentials Required

Requires your Twitter authToken. Use a test account.

Press ⌘ + Enter to execute

curl -X GET "https://api.tweetapi.com/tw-v2/interaction/dm-user-updates" \
  -H "X-API-Key: YOUR_API_KEY"
Response

Click "Try It!" to see the response