Manage follows: Standard v1.1 compared to Twitter API v2

Manage follows: Standard v1.1 compared to Twitter API v2

If you have been working with the standard v1.1 POST friendships/create and POST friendships/destroy endpoints, the goal of this guide is to help you understand the similarities and differences between the standard and Twitter API v2 manage follows endpoints.

  • Similarities
    • OAuth 1.0a User Context
  • Differences
    • Endpoint URLs
    • App and Project requirements
    • HTTP methods
    • Request parameters



OAuth 1.0a User Context authentication method

Both the endpoint versions support OAuth 1.0a User Context. Therefore, if you were previously using one of the standard v1.1 manage follows endpoints, you can continue using the same authentication method if you migrate to the Twitter API v2 version. 



Endpoint URLs

  • Standard v1.1 endpoints:
    • POST
      (follow a user)
    • POST
      (unfollow a user)
  • Twitter API v2 endpoint:
    • POST
      (follow a user)
    • DELETE
      (unfollow a user) 


App and Project requirements

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

Request parameters

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

Standard v1.1 Twitter API v2
No equivalent id (POST), source_user_id (DELETE)
user_id target_user_id
screen_name No equivalent

Please note that the Standard v1.1 parameters are passed as query parameters, whereas the Twitter API v2 parameters are passed as body parameters (for the POST endpoint) or path parameters (for the DELETE endpoint).

Also, the v2 id and source_user_id are not required when using the standard v1.1 endpoints since the Access Tokens passed with OAuth 1.0a User Context inferred which user was initiating the follow/unfollow.