DM Permissions

Dm Permissions

GET/tw-v2/interaction/dm-permissions

Description

Check if you can send direct messages to specific users. Verifies DM permissions for up to 50 recipient IDs at once.

Parameters

ParameterTypeRequiredDescription
authTokenstringrequiredAccount authentication token (auth_token cookie value)
recipientIdsstringrequiredComma-separated list of user IDs to check (max 50 IDs, e.g., '123456789,987654321')
proxystringoptionalOptional proxy in format 'host:port@user:pass'

Code Examples

const params = new URLSearchParams({
  authToken: 'YOUR_AUTH_TOKEN',
  recipientIds: '123456789,987654321'
});

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

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

Response

Success Response (200 OK)

200
{
  "permissions": [
    {
      "userId": "10016309",
      "canDm": false,
      "errorCode": 349
    },
    {
      "userId": "10017528",
      "canDm": false,
      "errorCode": 349
    }
  ],
  "users": [
    {
      "id": "10016309",
      "username": "sample_user_59576",
      "name": "Sample User 59576",
      "bio": "Sample profile bio for Sample User 59576.",
      "location": null,
      "website": "https://example.com/profile-59576",
      "pinnedTweetIds": [],
      "avatar": "https://example.com/images/sample-avatar-59576.jpg",
      "banner": null,
      "profileImageShape": null,
      "verified": false,
      "isBlueVerified": true,
      "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": 40162971,
      "followingCount": 120,
      "tweetCount": 0,
      "listedCount": 0,
      "mediaCount": 0,
      "favoritesCount": 0,
      "createdAt": "2009-04-23T21:53:30.000Z"
    },
    {
      "id": "10017528",
      "username": "sample_user_96991",
      "name": "Sample User 96991",
      "bio": "",
      "location": null,
      "website": null,
      "pinnedTweetIds": [],
      "avatar": "https://example.com/images/sample-avatar-96991.jpg",
      "banner": null,
      "profileImageShape": null,
      "verified": false,
      "isBlueVerified": true,
      "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": 227683330,
      "followingCount": 1220,
      "tweetCount": 0,
      "listedCount": 0,
      "mediaCount": 0,
      "favoritesCount": 0,
      "createdAt": "2009-06-02T20:12:29.000Z"
    }
  ]
}

API Playground

GET/tw-v2/interaction/dm-permissions

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-permissions" \
  -H "X-API-Key: YOUR_API_KEY"
Response

Click "Try It!" to see the response