Edin Osmic
Edin Osmic

Reputation: 446

Twitter API V2 reply to a tweet

I am trying hard to find a way to reply to a tweet with Twitter API V2, but it seems there is no endpoint for doing something like that, in Twitter Developer docs i found a way to post and delete a tweet, to retweet a tweet and delete a retweet, but i am struggling with replies, can you please help me with this? Thanks.

Upvotes: 7

Views: 4827

Answers (2)

mayanksoni121
mayanksoni121

Reputation: 101

For those who are having trouble in the previous answer. Pass this following in the body of the request.

{
    "text": "Hello World!2",
    "reply": {
        "in_reply_to_tweet_id":"175381330075023636"
    }
}

Upvotes: 4

Edin Osmic
Edin Osmic

Reputation: 446

For anyone coming later at this post, here is answer: 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 }

Upvotes: 11

Related Questions