Back to Autogpt

Twitter Blocks

docs/integrations/block-integrations/twitter/blocks.md

0.6.442.4 KB
Original Source

Twitter Blocks

<!-- MANUAL: file_description -->

Blocks for managing blocked users on Twitter/X.

<!-- END MANUAL -->

Twitter Get Blocked Users

What it is

This block retrieves a list of users blocked by the authenticating user.

How it works

<!-- MANUAL: how_it_works -->

This block uses the Twitter API v2 via Tweepy to retrieve a paginated list of users that the authenticated account has blocked. It authenticates using OAuth 2.0 with the required scopes (users.read, block.read) and sends a request to Twitter's blocked users endpoint.

The response includes user IDs and usernames by default, with optional expansions to include additional data like pinned tweets. Pagination is supported through tokens, allowing retrieval of large block lists in batches of up to 1,000 users per request.

<!-- END MANUAL -->

Inputs

InputDescriptionTypeRequired
expansionsChoose what extra information you want to get with user data. Currently only 'pinned_tweet_id' is available to see a user's pinned tweet.UserExpansionsFilterNo
tweet_fieldsSelect what tweet information you want to see in pinned tweets. This only works if you select 'pinned_tweet_id' in expansions above.TweetFieldsFilterNo
user_fieldsSelect what user information you want to see, like username, bio, profile picture, etc.TweetUserFieldsFilterNo
max_resultsMaximum number of results to return (1-1000, default 100)intNo
pagination_tokenToken for retrieving next/previous page of resultsstrNo

Outputs

OutputDescriptionType
errorError message if the operation failedstr
user_idsList of blocked user IDsList[str]
usernames_List of blocked usernamesList[str]
includedAdditional data requested via expansionsDict[str, Any]
metaMetadata including pagination infoDict[str, Any]
next_tokenNext token for paginationstr

Possible use case

<!-- MANUAL: use_case -->

Block List Audit: Review your block list periodically to identify accounts you may want to unblock or to analyze blocking patterns.

Safety Monitoring: Track blocked accounts as part of a harassment monitoring workflow, documenting problematic accounts.

Account Migration: Export your block list when setting up a new account or for backup purposes.

<!-- END MANUAL -->