We are making two sets of changes to our APIs & related documentation. These updates clarify the status of some data fields that are already obsolete, clean up legacy features, and retire access to some outdated endpoints.

These changes fall into two categories:

  • Deprecation of some fields in the user object to remove cruft and simplify access to settings values
  • Deprecation of the GET users/suggestions API endpoints

User object changes

As part of our ongoing work to simplify our web app and update our desktop web client, we are phasing out support for legacy profile customization values in our apps. We are also taking this opportunity to further clean up the user object payload by removing account settings values and follow request values from user objects returned. In the future, account settings will only be available via GET account/settings, and follow relationship values will only be available via GET friendships/lookup.

The following fields should no longer be relied on by developers when making use of the user object, including when returned as part of a Tweet. Starting on May 20, 2019, all of the following fields will no longer be supported. Developers should expect them to start returning null values. This will be documented appropriately as part of the user data dictionary. These changes apply across our standard, premium, and enterprise API products.

  • Settings values (these will only be available via GET account/settings in the future)
    • lang (NOTE: this value was a user interface configuration setting, and not related to the language of Tweets, which will continue to be part of the Tweet object)
    • geo_enabled
  • Follow relationship values (available only via GET friendships/lookup in the future)
    • follow_request_sent (similar to previously deprecated following value)
  • Obsolete values
    • profile_location
    • is_translation_enabled
    • translator_type
    • has_extended_profile
    • profile_background_color
    • profile_background_image_url
    • profile_background_image_url_https
    • profile_background_tile
    • profile_image_url
      • NOTE: profile_image_url_https will continue to be valid and populated for user profile images aka "avatar images." HTTPS URLs are the only formats that Twitter will support in internal data objects in the future, and you should update your apps and code appropriately
    • profile_link_color
    • profile_sidebar_border_color
    • profile_sidebar_fill_color
    • profile_text_color
    • profile_use_background_image

We have updated our documentation to reflect this change here.

GET users/suggestions changes

These endpoints are GET users/suggestions, GET users/suggestions/:slug, and GET users/suggestions/:slug/members.

These endpoints provided access to a curated “suggested users list” for different topics, which was formerly shown to new users of the Twitter app. This list is now obsolete (and has not been updated for some time). The endpoints will stop accepting requests on June 30, 2019. Responses will show a 410 Gone error.

What should I do now?

We recommend reviewing any code that may depend on valid string values in the affected user object fields, and ensuring that it is able to handle null responses. Examples may include database schemas where assumptions have been made as to the data formats returned. Additionally, review any code that attempted to functionally use these values, and update code that used the unsecured HTTP profile image URLs to point to the HTTPS versions instead.

You can ask further questions about these changes in the REST APIs category here on the developer forums.

4 Likes