Please note: This guide assumes you have completed the prerequisites from the quick start overview.

Steps to build a manage List follows request

Step one: Choose the List endpoint collection from Postman

Once you have the Twitter API v2 collection loaded in Postman, navigate to the “Lists” folder, and select “Follow a list”.

Step two: Specify the List to follow

Manage List follows endpoints require two IDs: one for the user (the authenticated user to follow a List) and the target List (the List to be followed). The user ID must correspond to the authenticating user’s ID, meaning that you must pass the Access Tokens associated with the user ID when authenticating your request. In this case, you can specify the ID belonging to your own user. You can find your ID in two ways:

  1. Using the user lookup by username endpoint, you can pass a username and receive the id field.
  2. Looking at your Access Token, you will find that the numeric part is your user ID.

 

The target List ID can be any valid List. In Postman, navigate to the "Params" tab, and enter the user ID into the "Value" column of the id path variable. Navigate to the “Body” tab and enter the ID of the List you wish to follow as the value for the list_id  parameter. Be sure not to include any spaces before or after any ID.

 

Key Value Parameter type
id The user ID path
list_id The target List ID to be followed body

 

You should now see a similar URL next to the "Send" button:

      https://api.twitter.com/2/users/2244994945/followed_lists
    

Step three: Make your request and review your response

Once you have everything set up, hit the "Send" button, and you will receive a similar response to the following example response:

      {
  "data": {
    "following": true
  }
}

    

You have successfully followed the target List if the returned response object contains a true value for the key following

To unfollow a List, select the “Unfollow a List” request also found in the “Lists” folder of the Twitter API v2 collection loaded in Postman. This endpoint requires the authenticated user ID and the ID of the List to be unfollowed. In the “Params” tab, enter the user ID as the value for the id column and ID of the List to be unfollowed as the value for the  list_id column. 

On successful delete request, you will receive a response similar to the following example:

      {
  "data": {
    "following": false
  }
}

    
Was this document helpful?
Thank you

Thank you for the feedback. We’re really glad we could help!

Thank you for the feedback. How could we improve this document?
Thank you for the feedback. Your comments will help us improve our documents in the future.