Manage Retweets: Standard v1.1 compared to Twitter API v2
If you have been working with the standard v1.1 POST statuses/retweet/:id, and POST statuses/unretweet/:id endpoints, the goal of this guide is to help you understand the similarities and differences between the standard and Twitter API v2 Retweets endpoints.
- Endpoint URLs and HTTP methods
- Request limitations
- App and Project requirements
- Request parameters
Both the standard v1.1 and Twitter API v2 manage Retweets (POST statuses/retweet/:id, and POST statuses/unretweet/:id) endpoints use OAuth 1.0a User Context. Therefore, if you were previously using one of the standard v1.1 Retweets lookup endpoints, you can continue using the same authentication method if you migrate to the Twitter API v2 version.
Endpoint URLs and HTTP methods
- Standard v1.1 endpoints:
(Retweets a tweet. Returns the original Tweet with Retweet details embedded)
(Undo a Retweet. Returns the original Tweet with Retweet details embedded)
- Twitter API v2 endpoint:
(Retweets a given Tweet)
(Undo a Retweet of a given Tweet)
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.
The following standard v1.1 request parameters accepted two request query parameters (user_id or screen_name). The Twitter API v2 only accepts the numerical user ID, and it must be passed as part of the endpoint path.
|Standard v1.1||Twitter API v2|
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, an id of the user Retweeting a Tweet is not required when using the standard v1.1 endpoints since the Access Tokens passed with OAuth 1.0a User Context infer which user is initiating the Retweet/undoing a Retweet.