Manage follows: Standard v1.1 compared to X 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 X API v2 manage follows endpoints.- Similarities
- OAuth 1.0a User Context
- Differences
- Endpoint URLs
- App and Project requirements
- HTTP methods
- Request parameters
Similarities
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 X API v2 version.Differences
Endpoint URLs- Standard v1.1 endpoints:
- POST https://api.x.com/1.1/friendships/create.json (follow a user)
- POST https://api.x.com/1.1/friendships/destroy.json (unfollow a user)
- X API v2 endpoint:
- POST https://api.x.com/2/users/:id/following (follow a user)
- DELETE https://api.x.com/2/users/:source\_user\_id/following/:target\_user\_id (unfollow a user)
Standard v1.1 | X API v2 |
---|---|
No equivalent | id (POST), source_user_id (DELETE) |
user_id | target_user_id |
screen_name | No equivalent |