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
authTokenstringrequiredTwitter 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": "6000000000000000001",
      "conversationId": "1000000000000000001-1000000000000000002",
      "senderId": "1000000000000000002",
      "recipientId": "1000000000000000001",
      "text": "Hi, I am doing well",
      "createdAt": "2024-01-30T11:30:00.000Z",
      "requestId": "00000000-0000-0000-0000-000000000006",
      "editCount": 0
    },
    {
      "id": "6000000000000000002",
      "conversationId": "1000000000000000002-3000000000000000001",
      "senderId": "3000000000000000001",
      "recipientId": "1000000000000000002",
      "text": "Check out our amazing investment opportunity!",
      "createdAt": "2024-01-30T12:00:00.000Z",
      "requestId": "00000000-0000-0000-0000-000000000007",
      "editCount": 0,
      "entities": {
        "urls": [
          {
            "url": "https://t.co/example789",
            "expandedUrl": "https://example.com/investment",
            "displayUrl": "example.com/investment"
          }
        ],
        "mentions": [],
        "hashtags": []
      }
    }
  ],
  "conversations": [
    {
      "id": "1000000000000000001-1000000000000000002",
      "type": "ONE_TO_ONE",
      "participants": [
        "1000000000000000001",
        "1000000000000000002"
      ],
      "lastMessageId": "6000000000000000001",
      "lastMessageTime": "2024-01-30T11:30:00.000Z",
      "lastReadMessageId": "6000000000000000001",
      "trusted": true,
      "muted": false,
      "readOnly": false,
      "lowQuality": false,
      "nsfw": false,
      "notificationsDisabled": false
    },
    {
      "id": "1000000000000000002-3000000000000000001",
      "type": "ONE_TO_ONE",
      "participants": [
        "1000000000000000002",
        "3000000000000000001"
      ],
      "lastMessageId": "6000000000000000002",
      "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": "User One",
      "bio": "Sample bio for user one",
      "location": null,
      "website": null,
      "pinnedTweetIds": [],
      "avatar": "https://example.com/avatar1.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": "User Two",
      "bio": "Sample bio for user two",
      "location": null,
      "website": null,
      "pinnedTweetIds": [],
      "avatar": "https://example.com/avatar2.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": "3000000000000000001",
      "username": "spam_user_one",
      "name": "Spam User One",
      "bio": "Get rich quick! Join now!",
      "location": null,
      "website": "https://example.com/spam",
      "pinnedTweetIds": [],
      "avatar": "https://example.com/spam_avatar1.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": "6000000000000000001",
  "minEntryId": "6000000000000000001",
  "maxEntryId": "6000000000000000002"
}

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