Mutes lookup: Standard v1.1 compared to Twitter API v2

If you have been working with the standard v1.1 GET mutes/users/ids and GET mutes/users/list endpoints, the goal of this guide is to help you understand the similarities and differences between the standard v1.1 and Twitter API v2 mutes lookup endpoints.

  • Similarities
    • Authentication
  • Differences
    • Endpoint URLs
    • Users per request limits
    • App and Project requirements
    • Response data formats
    • Request parameters

 

Similarities

Authentication

Both the standard v1.1 and Twitter API v2 mutes lookup endpoints use OAuth 1.0a User Context. Therefore, if you were previously using one of the standard v1.1 mutes lookup endpoints, you can continue using the same authentication method if you migrate to the Twitter API v2 version. 

 

Differences

Endpoint URLs

  • Standard v1.1 endpoints:
    • GET https://api.twitter.com/1.1/mutes/users/ids.json
      (list of user IDs who the specified user muted)
    • GET https://api.twitter.com/1.1/mutes/users/lists.json
      (list of users who are muted by the specified user)
  • Twitter API v2 endpoint:
    • GET https://api.twitter.com/2/users/:id/muting
      (list of users who are muted by the specified user ID)
       

Users per request limits

The standard v1.1 endpoints allow you to return up to 5000 users per request. The new v2 endpoints allow you to return up to 1000 users per request. To return a full 1000 users, you will need to pass max_results=1000 as a query parameter; you can then pass the next_token returned in the response payload to the pagination_token query parameter in your next request.
 

App and Project requirements

The Twitter API v2 endpoints require that you use credentials from a developer App that is associated with a Project when authenticating your requests. All Twitter API v1.1 endpoints can use credentials from standalone Apps or Apps associated with a project.

Response data format

One of the biggest differences between standard v1.1 and Twitter API v2 endpoint versions is how you select which fields return in your payload.

For the standard endpoints, you receive many of the response fields by default and then have the option to use parameters to identify which fields or sets of fields should return in the payload.

The Twitter API v2 version only delivers the user id, name, and username fields by default. To request any additional fields or objects, you will need to use the fields and expansions parameters. Any user fields that you request from this endpoint will return in the primary user object. Any expanded Tweet object and fields will return an includes object within your response. You can then match any expanded objects back to the user object by matching the IDs located in both the user and the expanded Tweet object. 

We encourage you to read more about these new parameters in their respective guides, or by reading our guide on how to use fields and expansions

We have also put together a data format migration guide which can help you map standard v1.1 fields to the newer v2 fields. This guide will also provide you the specific expansion and field parameter that you will need to pass with your v2 request to return specific fields. 
 

In addition to the changes in how you request certain fields, Twitter API v2 is also introducing new JSON designs for the objects returned by the APIs, including Tweet and user objects.

  • At the JSON root level, the standard endpoints return Tweet objects in a statuses array, while Twitter API v2 returns a data array. 
  • Instead of referring to Retweeted and Quoted "statuses", Twitter API v2 JSON refers to Retweeted and Quoted Tweets. Many legacy and deprecated fields, such as contributors and user.translator_type are being removed. 
  • Instead of using both favorites (in Tweet object) and favourites (in user object), Twitter API v2 uses the term like
  • Twitter is adopting the convention that JSON values with no value (for example, null) are not written to the payload. Tweet and user attributes are only included if they have a non-null values. 
     

We also introduced a new set of fields to the Tweet object including the following:

  • conversation_id field
  • Two new annotations fields, including context and entities
  • Several new metrics fields 
  • A new reply_setting field, which shows you who can reply to a given Tweet

 

Request parameters

The following standard v1.1 request parameters have equivalents in Twitter API v2:

Standard Twitter API v2
stringify_ids No equivalent
cursor pagination_token
skip_status No equivalent

 

There are also a set of standard v1.1 Mutes lookup request parameters not supported in Twitter API v2:

Standard Comment
include_entities This parameter is used to remove the entities node from the Tweet payload. It has been replaced with additive fields and expansions functionality.

 

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.