DELETE /2/users/:id/followed_lists/:list_id

DELETE /2/users/:id/followed_lists/:list_id

Enables the authenticated user to unfollow a List.

Endpoint URL

https://api.twitter.com/2/users/:id/followed_lists/:list_id

Authentication and rate limits

Authentication methods
supported by this endpoint

OAuth 1.0a is also available for this endpoint.

OAuth 2.0 Authorization Code with PKCE

Rate limit

User rate limit (User context): 50 requests per 15-minute window per each authenticated user

OAuth 2.0 scopes required by this endpoint

tweet.read

users.read

list.write

Learn more about OAuth 2.0 Authorization Code with PKCE

Path parameters

NameTypeDescription
id
 Required 
stringThe user ID who you are unfollowing a List on behalf of. It must match your own user ID or that of an authenticating user, meaning that you must pass the Access Tokens associated with the user ID when authenticating your request.
list_id
 Required 
stringThe ID of the List that you would like the user id to unfollow.


Example code with offical SDKs

TypeScript
Java
      (async () => {
  try {
    const unfollowList = await twitterClient.lists.listUserUnfollow(
      //The ID of the authenticated source user that will unfollow the List
      2244994945,

      //The ID of the List to unfollow
      1441162269824405510
    );
    console.dir(unfollowList, {
      depth: null,
    });
  } catch (error) {
    console.log(error);
  }
})();

    
      // Set the params values

// String | The ID of the authenticated source user that will unfollow the List
String id = "2244994945"; 

// String | The ID of the List to unfollow
String listId = "1441162269824405510";
try {
    ListFollowedResponse result = apiInstance.lists().listUserUnfollow(id, listId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ListsApi#listUserUnfollow");
    System.err.println("Status code: " + e.getCode());
    System.err.println("Reason: " + e.getResponseBody());
    System.err.println("Response headers: " + e.getResponseHeaders());
    e.printStackTrace();
}

    

Example responses

Successful response
      {
  "data": {
    "following": false
  }
}
    

Response fields

NameTypeDescription
followingbooleanIndicates whether the user unfollowed the specified List as a result of the request.