Dm Permissions
GET
/tw-v2/interaction/dm-permissionsDescription
Check if you can send direct messages to specific Twitter users. Verifies DM permissions for up to 50 recipient IDs at once.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| authToken | string | required | Twitter authentication token (auth_token cookie value) |
| recipientIds | string | required | Comma-separated list of user IDs to check (max 50 IDs, e.g., '123456789,987654321') |
| proxy | string | optional | Optional 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": "34743251",
"canDm": false,
"errorCode": 349
},
{
"userId": "44196397",
"canDm": false,
"errorCode": 349
}
],
"users": [
{
"id": "34743251",
"username": "SpaceX",
"name": "SpaceX",
"bio": "SpaceX designs, manufactures and launches the world’s most advanced rockets and spacecraft",
"location": null,
"website": "http://spacex.com",
"pinnedTweetIds": [],
"avatar": "https://pbs.twimg.com/profile_images/1697749409851985920/HbrI04tM_400x400.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": "44196397",
"username": "elonmusk",
"name": "Elon Musk",
"bio": "",
"location": null,
"website": null,
"pinnedTweetIds": [],
"avatar": "https://pbs.twimg.com/profile_images/1936002956333080576/kqqe2iWO_400x400.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-permissionsSensitive 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