I try to hide some user’s reply tweet from other.

(ex)
Account A tweet topics.
User A reply to topics.
User B can’t see User A reply tweet at Account A’s timeline and so.

how to reply is here.

url = "https://api.twitter.com/2/tweets"
params = {
        "text":"topic",
        "reply":{
            "in_reply_to_tweet_id": str(to_replied_tweet_id),
            },
        } 
res = twitter.post(url, json=params)

I get reply_tweet_id from that reply tweet response.
how to hide is here.

 url = "https://api.twitter.com/2/tweets/:id/hidden".replace(":id", reply_tweet_id)

params = {
        "hidden": True
        }
res = twitter.put(url, headers=headers, json=params)

this response is
{“title”: “Forbidden”, “detail”: “Forbidden”, “type”: “about:blank”, “status”: 403}

How can I hide tweet replies from other users?
(sorry poor english)

How exactly are you authenticating calls?

To hide tweets, you must authenticate as the author of the thread, so, to hide https://twitter.com/xx133/status/1601022137371807744 this tweet for example, you would need to authenticate as @NASA (using an access token that belongs to @NASA, either oAuth1.0a access token, or an oAuth2 PKCE ) in the PUT /2/tweets/:id/hidden | Docs | Twitter Developer Platform call.

1 Like

I understand need authenticate as user, when use hidden api.

example
https://twitter.com/711SEJ/with_replies

I had got reply from 711SEJ, but not found this reply at this site.
Is there another way?

1 Like

Sorry the above was my mistake. This endpoint is still alive and functioning properly.

I got response when I try:

  • Status Code: 200
{"data":{"hidden":true}}

@Ch_Support01 ,

I think you are trying to hide replies to tweets that are not owned by the user you authenticated, as @IgorBrigadir says, or you are trying to hide your own tweets.

1 Like

Thanks your advice.

I understand v2 hidden api requires authentication.

My idea of service can not use authentication.

So, I’m looking for way to other hidden.
like following twitter site.
Is it possible in account settings?

example
https://twitter.com/711SEJ/with_replies

I had got reply from 711SEJ, but not found this reply at this site.
Is there another way?

Are you maybe talking about nullcast tweets? Tweets that are made in the ads API / interface that do not appear in the normal feed or on the profile but would appear to any mentioned users, or as ads? Tweets | Docs | Twitter Developer Platform

Sorry, I had not known nullcast tweets.
Thanks to teach me, this way.

If We do likes following campaign service tweet.
(Make replay tweets invisible to users)

https://twitter.com/711SEJ/status/1601381189897490432
https://twitter.com/711SEJ/with_replies

Do we have to use ads promote tweet api?

You can make these nullcast tweets for free, you don’t have to promote them, but you need to create them while having access to the ads API as far as I know