Twitter / X connector
Bearer TokenCommunicationMarketingConnect to Twitter using an App-Only Bearer Token to access public, read-only, and application-level endpoints — search, compliance jobs and streams...
Twitter / X connector
-
Install the SDK
Section titled “Install the SDK”Terminal window npm install @scalekit-sdk/nodeTerminal window pip install scalekit -
Set your credentials
Section titled “Set your credentials”Add your Scalekit credentials to your
.envfile. Find values in app.scalekit.com > Developers > API Credentials..env SCALEKIT_ENVIRONMENT_URL=<your-environment-url>SCALEKIT_CLIENT_ID=<your-client-id>SCALEKIT_CLIENT_SECRET=<your-client-secret> -
Set up the connector
Section titled “Set up the connector”Register your Twitter / X credentials with Scalekit so it can authenticate requests on your behalf. You do this once per environment.
Dashboard setup steps
Register a Twitter Bearer Token with Scalekit to make app-only requests — reading public tweets, users, and search results without acting on behalf of a specific user. You’ll need a Bearer Token from an app in the X Developer Console.
-
Choose or create an app in the X Developer Console
-
Go to the X Developer Console and sign in.
-
Under Access > Apps, either select an existing app or click + Create App.

-
-
Generate a Bearer Token
-
Open your app and go to the Keys & Tokens tab.
-
Under App-Only Authentication, click Generate next to Bearer Token (or Regenerate if one already exists).

-
Copy the token immediately — X shows it in full only once.
-
-
Add the token in Scalekit
- In Scalekit dashboard, go to AgentKit > Connections > Create Connection. Search for Twitter Bearer and click Create.
- Paste the Bearer Token you copied in step 2.
- Click Save.
-
-
Make your first call
Section titled “Make your first call”quickstart.ts import { ScalekitClient } from '@scalekit-sdk/node'import 'dotenv/config'const scalekit = new ScalekitClient(process.env.SCALEKIT_ENV_URL,process.env.SCALEKIT_CLIENT_ID,process.env.SCALEKIT_CLIENT_SECRET,)const actions = scalekit.actionsconst connector = 'twitterbearer'const identifier = 'user_123'// Make your first callconst result = await actions.executeTool({connector,identifier,toolName: 'twitterbearer_activity_subscriptions_list',toolInput: {},})console.log(result)quickstart.py import osfrom scalekit.client import ScalekitClientfrom dotenv import load_dotenvload_dotenv()scalekit_client = ScalekitClient(env_url=os.getenv("SCALEKIT_ENV_URL"),client_id=os.getenv("SCALEKIT_CLIENT_ID"),client_secret=os.getenv("SCALEKIT_CLIENT_SECRET"),)actions = scalekit_client.actionsconnection_name = "twitterbearer"identifier = "user_123"# Make your first callresult = actions.execute_tool(tool_input={},tool_name="twitterbearer_activity_subscriptions_list",connection_name=connection_name,identifier=identifier,)print(result)
What you can do
Section titled “What you can do”Connect this agent connector to let your agent:
- Username users lookup by, user lookup by — Retrieves detailed information for 1 to 100 Twitter users by their usernames (each 1-15 alphanumeric characters/underscores)
- Lookup users, user, posts — Retrieves detailed information for specified X (formerly Twitter) user IDs
- Stream users compliance, tweets compliance, tweet label — Streams real-time compliance events (account deletions, deactivations, username changes, suspensions) for Users so downstream systems can stay in sync
- Get user posts, user owned lists, user mentions — Retrieves a collection of Posts (Tweets) authored by the specified user, most recent first
- List user, timeline get, members get — Retrieves all Twitter Lists a specified user is a member of, including public Lists and private Lists the authenticated user is authorized to view
- Search spaces, recent, full archive — Searches for Twitter Spaces by a textual query
Tool list
Section titled “Tool list”Use the exact tool names from the Tool list below when you call execute_tool. If you’re not sure which name to use, list the tools available for the current user first.
twitterbearer_activity_subscription_create#Creates a subscription for a single X activity event type, scoped to exactly one of a user (filter_user_id) or a keyword (filter_keyword) - Twitter rejects requests providing neither or both - delivered to a registered webhook. OAuth2 user-context tokens must hold the scope matching the requested event_type: dm.read for chat.* and dm.* events, like.read for like.* events, mute.read for mute.* events, block.read for block.* events, and tweet.read for all other event types. Mute and block subscriptions are actor-only.6 params
Creates a subscription for a single X activity event type, scoped to exactly one of a user (filter_user_id) or a keyword (filter_keyword) - Twitter rejects requests providing neither or both - delivered to a registered webhook. OAuth2 user-context tokens must hold the scope matching the requested event_type: dm.read for chat.* and dm.* events, like.read for like.* events, mute.read for mute.* events, block.read for block.* events, and tweet.read for all other event types. Mute and block subscriptions are actor-only.
event_typestringrequiredActivity event type in dot notationfilter_directionstringoptionalOptional direction filter for directional events. Not supported for mute.* or block.* events.filter_keywordstringoptionalOptional keyword filterfilter_user_idstringoptionalUser the subscription is scoped to. For mute.* and block.* events, this must be the authenticated source user.tagstringoptionalOptional caller-defined tagwebhook_idstringoptionalWebhook to deliver the subscription events totwitterbearer_activity_subscription_delete#Deletes one or more X activity subscriptions by ID (up to 100 at a time), stopping future activity event notifications for them.1 param
Deletes one or more X activity subscriptions by ID (up to 100 at a time), stopping future activity event notifications for them.
subscription_idsarrayrequiredIDs of the activity subscriptions to delete (1 to 100)twitterbearer_activity_subscriptions_list#List existing X activity subscriptions for the authenticated app. Complements Create Activity Subscription, which only covers creating new subscriptions on this same resource.0 params
List existing X activity subscriptions for the authenticated app. Complements Create Activity Subscription, which only covers creating new subscriptions on this same resource.
twitterbearer_community_get#Get details of an X Community by its ID: name, description, access type, join policy, and member count.2 params
Get details of an X Community by its ID: name, description, access type, join policy, and member count.
idstringrequiredCommunity ID to look upcommunity_fieldsstringoptionalComma-separated Community fields to include, e.g. access,created_at,description,member_count,nametwitterbearer_compliance_job_create#Creates a new compliance job to check the status of Tweet or user IDs. Upload IDs as a plain text file (one ID per line) to the upload_url received in the response.2 params
Creates a new compliance job to check the status of Tweet or user IDs. Upload IDs as a plain text file (one ID per line) to the upload_url received in the response.
typestringrequiredType of compliance jobresumablebooleanoptionalWhether the job should be resumabletwitterbearer_compliance_job_get#Retrieves status, download/upload URLs, and other details for an existing Twitter compliance job specified by its unique ID.1 param
Retrieves status, download/upload URLs, and other details for an existing Twitter compliance job specified by its unique ID.
idstringrequiredCompliance job IDtwitterbearer_compliance_jobs_list#Returns a list of recent compliance jobs, filtered by type (tweets or users) and optionally by status.2 params
Returns a list of recent compliance jobs, filtered by type (tweets or users) and optionally by status.
typestringrequiredType of compliance jobs to liststatusstringoptionalFilter by job statustwitterbearer_followers_get#Retrieves a list of users who follow a specified public Twitter user ID.5 params
Retrieves a list of users who follow a specified public Twitter user ID.
idstringrequiredTwitter user ID to get followers forexpansionsstringoptionalComma-separated expansionsmax_resultsintegeroptionalMax results per page (1-1000)pagination_tokenstringoptionalPagination token for next pageuser_fieldsstringoptionalComma-separated user fieldstwitterbearer_following_get#Retrieves users followed by a specific Twitter user, allowing pagination and customization of returned user and tweet data fields via expansions.5 params
Retrieves users followed by a specific Twitter user, allowing pagination and customization of returned user and tweet data fields via expansions.
idstringrequiredTwitter user IDexpansionsstringoptionalComma-separated expansionsmax_resultsintegeroptionalMax results per page (1-1000)pagination_tokenstringoptionalPagination token for next pageuser_fieldsstringoptionalComma-separated user fieldstwitterbearer_full_archive_search#Searches the full archive of public Tweets from March 2006 onwards. Use start_time and end_time together for a defined time window. Requires Academic Research access.10 params
Searches the full archive of public Tweets from March 2006 onwards. Use start_time and end_time together for a defined time window. Requires Academic Research access.
querystringrequiredSearch query using X search syntaxend_timestringoptionalISO 8601 end timeexpansionsstringoptionalComma-separated expansionsmax_resultsintegeroptionalMax results per page (10-500)next_tokenstringoptionalNext page tokensince_idstringoptionalMinimum tweet IDstart_timestringoptionalISO 8601 start time e.g. 2021-01-01T00:00:00Ztweet_fieldsstringoptionalComma-separated tweet fieldsuntil_idstringoptionalMaximum tweet IDuser_fieldsstringoptionalComma-separated user fieldstwitterbearer_full_archive_search_counts#Returns a count of Tweets from the full archive that match a specified query, aggregated by day, hour, or minute. start_time must be before end_time if both are provided. since_id/until_id cannot be used with start_time/end_time.7 params
Returns a count of Tweets from the full archive that match a specified query, aggregated by day, hour, or minute. start_time must be before end_time if both are provided. since_id/until_id cannot be used with start_time/end_time.
querystringrequiredSearch queryend_timestringoptionalISO 8601 end timegranularitystringoptionalAggregation granularitynext_tokenstringoptionalNext page tokensince_idstringoptionalMinimum tweet IDstart_timestringoptionalISO 8601 start timeuntil_idstringoptionalMaximum tweet IDtwitterbearer_likes_compliance_stream#Streams real-time compliance events (unlikes) for Likes so downstream systems can stay in sync. Requires Enterprise access and App-Only OAuth 2.0 auth.3 params
Streams real-time compliance events (unlikes) for Likes so downstream systems can stay in sync. Requires Enterprise access and App-Only OAuth 2.0 auth.
backfill_minutesintegeroptionalMinutes of backfill to stream on reconnect (0-5)end_timestringoptionalISO 8601 end timestart_timestringoptionalISO 8601 start timetwitterbearer_list_followers_get#Fetches a list of users who follow a specific Twitter List, identified by its ID. Ensure the authenticated user has access if the list is private.5 params
Fetches a list of users who follow a specific Twitter List, identified by its ID. Ensure the authenticated user has access if the list is private.
idstringrequiredTwitter List IDexpansionsstringoptionalComma-separated expansionsmax_resultsintegeroptionalMax results per page (1-100)pagination_tokenstringoptionalPagination token for next pageuser_fieldsstringoptionalComma-separated user fieldstwitterbearer_list_lookup#Returns metadata for a specific Twitter List, identified by its ID. Does not return list members. Can expand the owner's User object via the expansions parameter.4 params
Returns metadata for a specific Twitter List, identified by its ID. Does not return list members. Can expand the owner's User object via the expansions parameter.
idstringrequiredTwitter List IDexpansionsstringoptionalComma-separated expansionslist_fieldsstringoptionalComma-separated list fieldsuser_fieldsstringoptionalComma-separated user fieldstwitterbearer_list_members_get#Fetches members of a specific Twitter List, identified by its unique ID.5 params
Fetches members of a specific Twitter List, identified by its unique ID.
idstringrequiredTwitter List IDexpansionsstringoptionalComma-separated expansionsmax_resultsintegeroptionalMax results per page (1-100)pagination_tokenstringoptionalPagination token for next pageuser_fieldsstringoptionalComma-separated user fieldstwitterbearer_list_timeline_get#Fetches the most recent Tweets posted by members of a specified Twitter List.6 params
Fetches the most recent Tweets posted by members of a specified Twitter List.
idstringrequiredTwitter List IDexpansionsstringoptionalComma-separated expansionsmax_resultsintegeroptionalMax results per page (1-100)pagination_tokenstringoptionalPagination token for next pagetweet_fieldsstringoptionalComma-separated tweet fieldsuser_fieldsstringoptionalComma-separated user fieldstwitterbearer_media_batch_lookup#Retrieves details for one or more pieces of media identified by their media keys.2 params
Retrieves details for one or more pieces of media identified by their media keys.
media_keysstringrequiredComma-separated list of media keys (up to 100)media_fieldsstringoptionalComma-separated media fieldstwitterbearer_media_lookup#Retrieves details for a single piece of media by its media key.2 params
Retrieves details for a single piece of media by its media key.
media_keystringrequiredMedia key to look upmedia_fieldsstringoptionalComma-separated media fieldstwitterbearer_openapi_spec_get#Fetches the OpenAPI specification (JSON) for Twitter's API v2. Used to programmatically understand the API's structure for developing client libraries or tools.0 params
Fetches the OpenAPI specification (JSON) for Twitter's API v2. Used to programmatically understand the API's structure for developing client libraries or tools.
twitterbearer_post_lookup#Fetches comprehensive details for a single Tweet by its unique ID, provided the Tweet exists and is accessible.5 params
Fetches comprehensive details for a single Tweet by its unique ID, provided the Tweet exists and is accessible.
idstringrequiredTweet IDexpansionsstringoptionalComma-separated expansionsmedia_fieldsstringoptionalComma-separated media fieldstweet_fieldsstringoptionalComma-separated tweet fieldsuser_fieldsstringoptionalComma-separated user fieldstwitterbearer_post_quotes_get#Retrieves Tweets that quote a specified Tweet. Requires a valid Tweet ID.5 params
Retrieves Tweets that quote a specified Tweet. Requires a valid Tweet ID.
idstringrequiredTweet IDexpansionsstringoptionalComma-separated expansionsmax_resultsintegeroptionalMax results per page (1-100)pagination_tokenstringoptionalPagination token for next pagetweet_fieldsstringoptionalComma-separated tweet fieldstwitterbearer_post_retweeters_get#Retrieves users who publicly retweeted a specified public Post ID, excluding Quote Tweets and retweets from private accounts.5 params
Retrieves users who publicly retweeted a specified public Post ID, excluding Quote Tweets and retweets from private accounts.
idstringrequiredTweet IDexpansionsstringoptionalComma-separated expansionsmax_resultsintegeroptionalMax results per page (1-100)pagination_tokenstringoptionalPagination token for next pageuser_fieldsstringoptionalComma-separated user fieldstwitterbearer_post_retweets_get#Retrieves Tweets that Retweeted a specified public or authenticated-user-accessible Tweet ID. Optionally customize the response with fields and expansions.5 params
Retrieves Tweets that Retweeted a specified public or authenticated-user-accessible Tweet ID. Optionally customize the response with fields and expansions.
idstringrequiredTweet IDexpansionsstringoptionalComma-separated expansionsmax_resultsintegeroptionalMax results per page (1-100)pagination_tokenstringoptionalPagination token for next pagetweet_fieldsstringoptionalComma-separated tweet fieldstwitterbearer_posts_lookup#Retrieves detailed information for one or more Posts (Tweets) identified by their unique IDs. Allows selection of specific fields and expansions.5 params
Retrieves detailed information for one or more Posts (Tweets) identified by their unique IDs. Allows selection of specific fields and expansions.
idsstringrequiredComma-separated list of Tweet IDs (up to 100)expansionsstringoptionalComma-separated expansionsmedia_fieldsstringoptionalComma-separated media fieldstweet_fieldsstringoptionalComma-separated tweet fieldsuser_fieldsstringoptionalComma-separated user fieldstwitterbearer_recent_search#Searches Tweets from the last 7 days matching a query using X's search syntax. Ideal for real-time analysis, trend monitoring, or retrieving posts from specific users (e.g., from:username). Note: impression_count returns 0 for other users' tweets — use retweet_count, like_count, or quote_count for engagement filtering instead.11 params
Searches Tweets from the last 7 days matching a query using X's search syntax. Ideal for real-time analysis, trend monitoring, or retrieving posts from specific users (e.g., from:username). Note: impression_count returns 0 for other users' tweets — use retweet_count, like_count, or quote_count for engagement filtering instead.
querystringrequiredSearch query using X search syntax, e.g. from:username -is:retweetend_timestringoptionalISO 8601 end timeexpansionsstringoptionalComma-separated expansionsmax_resultsintegeroptionalMax results per page (10-100)media_fieldsstringoptionalComma-separated media fieldsnext_tokenstringoptionalNext page tokensince_idstringoptionalMinimum tweet IDstart_timestringoptionalISO 8601 start timetweet_fieldsstringoptionalComma-separated tweet fieldsuntil_idstringoptionalMaximum tweet IDuser_fieldsstringoptionalComma-separated user fieldstwitterbearer_recent_tweet_counts#Retrieves the count of Tweets matching a specified search query within the last 7 days, aggregated by 'minute', 'hour', or 'day'.6 params
Retrieves the count of Tweets matching a specified search query within the last 7 days, aggregated by 'minute', 'hour', or 'day'.
querystringrequiredSearch queryend_timestringoptionalISO 8601 end timegranularitystringoptionalAggregation granularitysince_idstringoptionalMinimum tweet IDstart_timestringoptionalISO 8601 start timeuntil_idstringoptionalMaximum tweet IDtwitterbearer_space_get#Retrieves details for a Twitter Space by its ID, allowing for customization and expansion of related data.4 params
Retrieves details for a Twitter Space by its ID, allowing for customization and expansion of related data.
idstringrequiredTwitter Space IDexpansionsstringoptionalComma-separated expansionsspace_fieldsstringoptionalComma-separated space fieldsuser_fieldsstringoptionalComma-separated user fieldstwitterbearer_space_posts_get#Retrieves Tweets that were shared/posted during a Twitter Space broadcast. Returns Tweets that participants explicitly shared during the Space session, NOT audio transcripts. Most Spaces have zero associated Tweets — empty results are normal.4 params
Retrieves Tweets that were shared/posted during a Twitter Space broadcast. Returns Tweets that participants explicitly shared during the Space session, NOT audio transcripts. Most Spaces have zero associated Tweets — empty results are normal.
idstringrequiredTwitter Space IDexpansionsstringoptionalComma-separated expansionsmax_resultsintegeroptionalMax results per page (1-100)tweet_fieldsstringoptionalComma-separated tweet fieldstwitterbearer_spaces_by_creator_get#Retrieves Twitter Spaces created by a list of specified User IDs, with options to customize returned data fields.4 params
Retrieves Twitter Spaces created by a list of specified User IDs, with options to customize returned data fields.
user_idsstringrequiredComma-separated list of user IDs to get spaces forexpansionsstringoptionalComma-separated expansionsspace_fieldsstringoptionalComma-separated space fieldsuser_fieldsstringoptionalComma-separated user fieldstwitterbearer_spaces_get#Fetches detailed information for one or more Twitter Spaces (live, scheduled, or ended) by their unique IDs. At least one Space ID must be provided.4 params
Fetches detailed information for one or more Twitter Spaces (live, scheduled, or ended) by their unique IDs. At least one Space ID must be provided.
idsstringrequiredComma-separated list of Space IDsexpansionsstringoptionalComma-separated expansionsspace_fieldsstringoptionalComma-separated space fieldsuser_fieldsstringoptionalComma-separated user fieldstwitterbearer_spaces_search#Searches for Twitter Spaces by a textual query. Optionally filter by state (live, scheduled, all) to discover audio conversations.5 params
Searches for Twitter Spaces by a textual query. Optionally filter by state (live, scheduled, all) to discover audio conversations.
querystringrequiredText to search for in Space titlesexpansionsstringoptionalComma-separated expansionsmax_resultsintegeroptionalMax results per page (1-100)space_fieldsstringoptionalComma-separated space fieldsstatestringoptionalFilter by space statetwitterbearer_tweet_label_stream#Stream real-time Tweet label events (apply/remove). Requires Enterprise access and App-Only OAuth 2.0 auth. Returns PublicTweetNotice or PublicTweetUnviewable events. 403 errors indicate missing Enterprise access or wrong auth type.3 params
Stream real-time Tweet label events (apply/remove). Requires Enterprise access and App-Only OAuth 2.0 auth. Returns PublicTweetNotice or PublicTweetUnviewable events. 403 errors indicate missing Enterprise access or wrong auth type.
backfill_minutesintegeroptionalMinutes of backfill to stream on reconnect (0-5)end_timestringoptionalYYYY-MM-DDTHH:mm:ssZ. Latest UTC timestamp from which Post labels will be provided.start_timestringoptionalYYYY-MM-DDTHH:mm:ssZ. Earliest UTC timestamp from which Post labels will be provided.twitterbearer_tweet_usage_get#Fetches Tweet usage statistics for a Project (e.g., consumption, caps, daily breakdowns for Project and Client Apps) to monitor API limits. Data can be retrieved for 1 to 90 days.2 params
Fetches Tweet usage statistics for a Project (e.g., consumption, caps, daily breakdowns for Project and Client Apps) to monitor API limits. Data can be retrieved for 1 to 90 days.
daysintegeroptionalNumber of days to retrieve usage data for, default 7usage_fieldsstringoptionalComma-separated usage fields to includetwitterbearer_tweets_compliance_stream#Streams real-time compliance events (deletions, scrubs, edits) for Tweets so downstream systems can stay in sync. Requires Enterprise access and App-Only OAuth 2.0 auth.4 params
Streams real-time compliance events (deletions, scrubs, edits) for Tweets so downstream systems can stay in sync. Requires Enterprise access and App-Only OAuth 2.0 auth.
partitionintegerrequiredPartition number to connect to (1-4)backfill_minutesintegeroptionalMinutes of backfill to stream on reconnect (0-5)end_timestringoptionalISO 8601 end timestart_timestringoptionalISO 8601 start timetwitterbearer_user_followed_lists_get#Returns metadata (not Tweets) for lists a specific Twitter user follows. Optionally includes expanded owner details.6 params
Returns metadata (not Tweets) for lists a specific Twitter user follows. Optionally includes expanded owner details.
idstringrequiredTwitter user IDexpansionsstringoptionalComma-separated expansionslist_fieldsstringoptionalComma-separated list fieldsmax_resultsintegeroptionalMax results per page (1-100)pagination_tokenstringoptionalPagination token for next pageuser_fieldsstringoptionalComma-separated user fieldstwitterbearer_user_list_memberships_get#Retrieves all Twitter Lists a specified user is a member of, including public Lists and private Lists the authenticated user is authorized to view.6 params
Retrieves all Twitter Lists a specified user is a member of, including public Lists and private Lists the authenticated user is authorized to view.
idstringrequiredTwitter user IDexpansionsstringoptionalComma-separated expansionslist_fieldsstringoptionalComma-separated list fieldsmax_resultsintegeroptionalMax results per page (1-100)pagination_tokenstringoptionalPagination token for next pageuser_fieldsstringoptionalComma-separated user fieldstwitterbearer_user_lookup#Retrieves detailed public information for a Twitter user by their ID. Optionally expand related data (e.g., pinned tweets) and specify particular user or tweet fields to return.4 params
Retrieves detailed public information for a Twitter user by their ID. Optionally expand related data (e.g., pinned tweets) and specify particular user or tweet fields to return.
idstringrequiredTwitter user IDexpansionsstringoptionalComma-separated expansionstweet_fieldsstringoptionalComma-separated tweet fieldsuser_fieldsstringoptionalComma-separated user fieldstwitterbearer_user_lookup_by_username#Fetches public profile information for a valid and existing Twitter user by their username. Optionally expands related data like pinned Tweets. Results may be limited for protected profiles not followed by the authenticated user.4 params
Fetches public profile information for a valid and existing Twitter user by their username. Optionally expands related data like pinned Tweets. Results may be limited for protected profiles not followed by the authenticated user.
usernamestringrequiredTwitter username without the @ symbol, e.g. elonmuskexpansionsstringoptionalComma-separated expansionstweet_fieldsstringoptionalComma-separated tweet fieldsuser_fieldsstringoptionalComma-separated user fieldstwitterbearer_user_mentions_get#Retrieves Posts (Tweets) that mention the specified user, most recent first.10 params
Retrieves Posts (Tweets) that mention the specified user, most recent first.
idstringrequiredUser ID whose mentions should be retrievedend_timestringoptionalISO 8601 end timeexpansionsstringoptionalComma-separated expansionsmax_resultsintegeroptionalMax results per page (5-100)pagination_tokenstringoptionalPagination token for next pagesince_idstringoptionalMinimum tweet IDstart_timestringoptionalISO 8601 start timetweet_fieldsstringoptionalComma-separated tweet fieldsuntil_idstringoptionalMaximum tweet IDuser_fieldsstringoptionalComma-separated user fieldstwitterbearer_user_owned_lists_get#Retrieves Lists created (owned) by a specific Twitter user, not Lists they follow or are subscribed to.6 params
Retrieves Lists created (owned) by a specific Twitter user, not Lists they follow or are subscribed to.
idstringrequiredTwitter user IDexpansionsstringoptionalComma-separated expansionslist_fieldsstringoptionalComma-separated list fieldsmax_resultsintegeroptionalMax results per page (1-100)pagination_tokenstringoptionalPagination token for next pageuser_fieldsstringoptionalComma-separated user fieldstwitterbearer_user_posts_get#Retrieves a collection of Posts (Tweets) authored by the specified user, most recent first.11 params
Retrieves a collection of Posts (Tweets) authored by the specified user, most recent first.
idstringrequiredUser ID whose Posts should be retrievedend_timestringoptionalISO 8601 end timeexcludestringoptionalComma-separated types to exclude: replies,retweetsexpansionsstringoptionalComma-separated expansionsmax_resultsintegeroptionalMax results per page (5-100)pagination_tokenstringoptionalPagination token for next pagesince_idstringoptionalMinimum tweet IDstart_timestringoptionalISO 8601 start timetweet_fieldsstringoptionalComma-separated tweet fieldsuntil_idstringoptionalMaximum tweet IDuser_fieldsstringoptionalComma-separated user fieldstwitterbearer_users_compliance_stream#Streams real-time compliance events (account deletions, deactivations, username changes, suspensions) for Users so downstream systems can stay in sync. Requires Enterprise access and App-Only OAuth 2.0 auth.4 params
Streams real-time compliance events (account deletions, deactivations, username changes, suspensions) for Users so downstream systems can stay in sync. Requires Enterprise access and App-Only OAuth 2.0 auth.
partitionintegerrequiredPartition number to connect to (1-4)backfill_minutesintegeroptionalMinutes of backfill to stream on reconnect (0-5)end_timestringoptionalISO 8601 end timestart_timestringoptionalISO 8601 start timetwitterbearer_users_lookup#Retrieves detailed information for specified X (formerly Twitter) user IDs. Optionally customize returned fields and expand related entities like pinned tweets.4 params
Retrieves detailed information for specified X (formerly Twitter) user IDs. Optionally customize returned fields and expand related entities like pinned tweets.
idsstringrequiredComma-separated list of Twitter user IDs (up to 100)expansionsstringoptionalComma-separated expansionstweet_fieldsstringoptionalComma-separated tweet fieldsuser_fieldsstringoptionalComma-separated user fieldstwitterbearer_users_lookup_by_username#Retrieves detailed information for 1 to 100 Twitter users by their usernames (each 1-15 alphanumeric characters/underscores). Allows customizable user/tweet fields and expansion of related data like pinned tweets.4 params
Retrieves detailed information for 1 to 100 Twitter users by their usernames (each 1-15 alphanumeric characters/underscores). Allows customizable user/tweet fields and expansion of related data like pinned tweets.
usernamesstringrequiredComma-separated list of Twitter usernames without @ symbols (up to 100)expansionsstringoptionalComma-separated expansionstweet_fieldsstringoptionalComma-separated tweet fieldsuser_fieldsstringoptionalComma-separated user fields