DEV Community

Saadman Rafat
Saadman Rafat

Posted on

Twitter API v2: Hide Replies with now supports Hide Replies. Set the environment variables as shown below. If you currently are not in possession of a account. Check out this list of apps curated by Twitter. You can use these applications to hide conversations.


~$ mkdir twitterStream && cd twitterStream
~$ pipenv install # or use pip3
~$ pipenv shell
(twitter-stream) ~$ export $API_KEY=API_KEY
(twitter-stream) ~$ export $API_KEY_SECRET=API_KEY_SECRET
(twitter-stream) ~$ export $ACCESS_TOKEN=ACCESS_TOKEN
(twitter-stream) ~$ touch
(twitter-stream) ~$ tree
├── Pipfile
└── Pipfile.lock
0 directories, 3 files

Enter fullscreen mode Exit fullscreen mode

Enter the URL of the reply to your tweet you want to hide. The authorized user should be making the API call.

from twitter_stream import hide_replies

response = hide_replies(
    tweet: str = '',
    hidden: dict = {"hidden": True} # or {"hidden": False} to unhide
Enter fullscreen mode Exit fullscreen mode


   "data": {
     "hidden": true 
Enter fullscreen mode Exit fullscreen mode also supports FilteredStream, SampledStream, RecentSearch, TweetLookUp, and UserLookUp. To get more insights into other API endpoints. Visit the examples folder and our documentations

docs :
github :
mail :
twitter: @twitivitydev
report an issue: Issues

Top comments (0)