Leave Community
POST
/tw-v2/interaction/leave-communityDescription
Leave a Twitter/X community. Returns community details including name, description, and member count after leaving.
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
| authToken | string | required | Twitter authentication token (auth_token cookie value) |
| communityId | string | required | The numeric ID of the community to leave |
| proxy | string | optional | Optional proxy in format 'host:port@user:pass' |
Code Examples
const body = {
authToken: 'YOUR_AUTH_TOKEN',
communityId: '1234567890123456789'
};
const response = await fetch('https://api.tweetapi.com/tw-v2/interaction/leave-community', {
method: 'POST',
headers: {
'X-API-Key': 'YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify(body)
});
const data = await response.json();
console.log(data);
Response
Success Response (200 OK)
200
{
"data": {
"id": "9876543210987654321",
"action": "leave_community",
"timestamp": "2025-01-15T14:45:00.000Z",
"success": true,
"metadata": {
"community_id": "9876543210987654321",
"community_name": "Sample Community",
"community_description": "A community for general discussions and networking",
"member_count": 5432,
"role": "NonMember"
}
}
}API Playground
POST
/tw-v2/interaction/leave-communitySensitive Credentials Required
Requires your Twitter authToken. Use a test account.
Press ⌘ + Enter to execute
curl -X POST "https://api.tweetapi.com/tw-v2/interaction/leave-community" \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json"Response
Click "Try It!" to see the response