I am using a postman to test Twitter API v2, goal is to post a retweet and to delete a retweet. Somehow I am able to post a retweet but problem is that the retweet is empty. This is the Twitter API endpoint ‘https://api.twitter.com/2/users/:id/retweets’, ‘: id’ is being replaced with my Twitter id. Authorization using OAuth 1.0, which works. And I am sending the ‘twitter_id’ id body as JSON data. Now what I get as a response is
{
"data": {
"retweeted": true
}
}
so my question is how do I send a retweet text in this request because all Twitter is giving me for this post request is this endpoint I mentioned earlier.
2
Answers
What i wanted to actieve was this: Endpoint for this action is "api.twitter.com/2/tweets", and parameters you have to pass are "text" and "reply" object with "in_reply_to_tweet_id" key, like this "reply: { in_reply_to_tweet_id: tweet_id }
A Retweet does not include any text, it’s just an action on an existing Tweet, which is succeeding here.
You seem to be describing a Quote Tweet, where you re-post another Tweet with your own comment? To do that, you would take the URL of the existing Tweet, and use the Create Tweet endpoint to post a new Tweet containing your text, and the URL to the existing Tweet.