Twitter API v2 available endpoints
Bring your own key. This API needs your own Twitter API v2 key - get one from the provider, add it once below, and the proxy injects it on every call. Your OmniStream plan covers the unified SDK, key storage, and proxy - the provider's own rate limits still apply to your key.
This is a community listing. If you own this API, you can request ownership.
npm install omnistream-sdkimport { OmniClient } from "omnistream-sdk";
const omni = new OmniClient({ token: process.env.OMNI_KEY! });
// One key reaches every API on the marketplace.
const data = await omni.call("twitter/listBatchComplianceJobs");One install, one key - the same client calls every API on the marketplace.
Type of Compliance Job to list.
Status of Compliance Job to list.
A comma separated list of ComplianceJob fields to display.
List Compliance Jobs
Create compliance job
Get Compliance Job
Create a new DM Conversation
Get DM Events for a DM Conversation
/**
* TwitterAPIv2 - generated by OmniStream from Twitter API v2's OpenAPI spec.
* One typed method per endpoint. A single Omni key reaches the API.
*/
const DEFAULT_BASE = "https://grid.skinvaults.online/v1/proxy/twitter";
export class TwitterAPIv2Error extends Error {
status: number;
code?: string;
constructor(status: number, code: string | undefined, message?: string) {
super(message || `TwitterAPIv2 error ${status}`);
this.name = "TwitterAPIv2Error";
this.status = status;
this.code = code;
}
}
export interface TwitterAPIv2Options {
baseUrl?: string;
fetch?: typeof fetch;
timeoutMs?: number;
}
export class TwitterAPIv2 {
/** @param token Your OmniStream key (one key for every API). */
constructor(private token: string, private opts: TwitterAPIv2Options = {}) {
if (!token) throw new Error("TwitterAPIv2: token is required");
}
rateLimit: { remainingMinute?: number; remainingDay?: number } | null = null;
private async _request(method: string, path: string, { params, body }: { params?: Record<string, unknown>; body?: unknown } = {}): Promise<any> {
const f = this.opts.fetch ?? globalThis.fetch;
const url = new URL((this.opts.baseUrl ?? DEFAULT_BASE).replace(/\/+$/, "") + path);
if (params) for (const [k, v] of Object.entries(params)) if (v != null) url.searchParams.set(k, String(v));
const headers: Record<string, string> = { "x-omni-key": this.token };
if (body !== undefined) headers["content-type"] = "application/json";
const res = await f(url, { method, headers, body: body !== undefined ? JSON.stringify(body) : undefined });
this.rateLimit = {
remainingMinute: Number(res.headers.get("x-ratelimit-remaining-minute")) || undefined,
remainingDay: Number(res.headers.get("x-ratelimit-remaining-day")) || undefined,
};
const data = await res.json().catch(() => ({}));
if (!res.ok) throw new TwitterAPIv2Error(res.status, data?.error?.code, data?.error?.message);
return data.data ?? data;
}
/** List Compliance Jobs */
listBatchComplianceJobs(params: { "type": string; "status"?: string; "compliance_job.fields"?: unknown[] }): Promise<any> {
return this._request("GET", "/2/compliance/jobs", { params });
}
/** Create compliance job */
createBatchComplianceJob(body: unknown): Promise<any> {
return this._request("POST", "/2/compliance/jobs", { body });
}
/** Get Compliance Job */
getBatchComplianceJob(params: { "id": string; "compliance_job.fields"?: unknown[] }): Promise<any> {
return this._request("GET", "/2/compliance/jobs/{id}", { params });
}
/** Create a new DM Conversation */
dmConversationIdCreate(body: unknown): Promise<any> {
return this._request("POST", "/2/dm_conversations", { body });
}
/** Get DM Events for a DM Conversation */
getDmConversationsWithParticipantIdDmEvents(params: { "participant_id": string; "max_results"?: number; "pagination_token"?: string; "event_types"?: unknown[]; "dm_event.fields"?: unknown[]; "expansions"?: unknown[]; "media.fields"?: unknown[]; "user.fields"?: unknown[]; "tweet.fields"?: unknown[] }): Promise<any> {
return this._request("GET", "/2/dm_conversations/with/{participant_id}/dm_events", { params });
}
/** Send a new message to a user */
dmConversationWithUserEventIdCreate(body: unknown, params: { "participant_id": string }): Promise<any> {
return this._request("POST", "/2/dm_conversations/with/{participant_id}/messages", { body, params });
}
/** Send a new message to a DM Conversation */
dmConversationByIdEventIdCreate(body: unknown, params: { "dm_conversation_id": string }): Promise<any> {
return this._request("POST", "/2/dm_conversations/{dm_conversation_id}/messages", { body, params });
}
/** Get DM Events for a DM Conversation */
getDmConversationsIdDmEvents(params: { "id": string; "max_results"?: number; "pagination_token"?: string; "event_types"?: unknown[]; "dm_event.fields"?: unknown[]; "expansions"?: unknown[]; "media.fields"?: unknown[]; "user.fields"?: unknown[]; "tweet.fields"?: unknown[] }): Promise<any> {
return this._request("GET", "/2/dm_conversations/{id}/dm_events", { params });
}
/** Get recent DM Events */
getDmEvents(params: { "max_results"?: number; "pagination_token"?: string; "event_types"?: unknown[]; "dm_event.fields"?: unknown[]; "expansions"?: unknown[]; "media.fields"?: unknown[]; "user.fields"?: unknown[]; "tweet.fields"?: unknown[] }): Promise<any> {
return this._request("GET", "/2/dm_events", { params });
}
/** Create List */
listIdCreate(body: unknown): Promise<any> {
return this._request("POST", "/2/lists", { body });
}
/** List lookup by List ID. */
listIdGet(params: { "id": string; "list.fields"?: unknown[]; "expansions"?: unknown[]; "user.fields"?: unknown[] }): Promise<any> {
return this._request("GET", "/2/lists/{id}", { params });
}
/** Update List. */
listIdUpdate(body: unknown, params: { "id": string }): Promise<any> {
return this._request("PUT", "/2/lists/{id}", { body, params });
}
/** Delete List */
listIdDelete(params: { "id": string }): Promise<any> {
return this._request("DELETE", "/2/lists/{id}", { params });
}
/** Returns User objects that follow a List by the provided List ID */
listGetFollowers(params: { "id": string; "max_results"?: number; "pagination_token"?: string; "user.fields"?: unknown[]; "expansions"?: unknown[]; "tweet.fields"?: unknown[] }): Promise<any> {
return this._request("GET", "/2/lists/{id}/followers", { params });
}
/** Returns User objects that are members of a List by the provided List ID. */
listGetMembers(params: { "id": string; "max_results"?: number; "pagination_token"?: string; "user.fields"?: unknown[]; "expansions"?: unknown[]; "tweet.fields"?: unknown[] }): Promise<any> {
return this._request("GET", "/2/lists/{id}/members", { params });
}
/** Add a List member */
listAddMember(body: unknown, params: { "id": string }): Promise<any> {
return this._request("POST", "/2/lists/{id}/members", { body, params });
}
/** Remove a List member */
listRemoveMember(params: { "id": string; "user_id": string }): Promise<any> {
return this._request("DELETE", "/2/lists/{id}/members/{user_id}", { params });
}
/** List Tweets timeline by List ID. */
listsIdTweets(params: { "id": string; "max_results"?: number; "pagination_token"?: string; "tweet.fields"?: unknown[]; "expansions"?: unknown[]; "media.fields"?: unknown[]; "poll.fields"?: unknown[]; "user.fields"?: unknown[]; "place.fields"?: unknown[] }): Promise<any> {
return this._request("GET", "/2/lists/{id}/tweets", { params });
}
/** Returns the OpenAPI Specification document. */
getOpenApiSpec(): Promise<any> {
return this._request("GET", "/2/openapi.json", {});
}
/** Space lookup up Space IDs */
findSpacesByIds(params: { "ids": unknown[]; "space.fields"?: unknown[]; "expansions"?: unknown[]; "user.fields"?: unknown[]; "topic.fields"?: unknown[] }): Promise<any> {
return this._request("GET", "/2/spaces", { params });
}
/** Space lookup by their creators */
findSpacesByCreatorIds(params: { "user_ids": unknown[]; "space.fields"?: unknown[]; "expansions"?: unknown[]; "user.fields"?: unknown[]; "topic.fields"?: unknown[] }): Promise<any> {
return this._request("GET", "/2/spaces/by/creator_ids", { params });
}
/** Search for Spaces */
searchSpaces(params: { "query": string; "state"?: string; "max_results"?: number; "space.fields"?: unknown[]; "expansions"?: unknown[]; "user.fields"?: unknown[]; "topic.fields"?: unknown[] }): Promise<any> {
return this._request("GET", "/2/spaces/search", { params });
}
/** Space lookup by Space ID */
findSpaceById(params: { "id": string; "space.fields"?: unknown[]; "expansions"?: unknown[]; "user.fields"?: unknown[]; "topic.fields"?: unknown[] }): Promise<any> {
return this._request("GET", "/2/spaces/{id}", { params });
}
/** Retrieve the list of Users who purchased a ticket to the given space */
spaceBuyers(params: { "id": string; "pagination_token"?: string; "max_results"?: number; "user.fields"?: unknown[]; "expansions"?: unknown[]; "tweet.fields"?: unknown[] }): Promise<any> {
return this._request("GET", "/2/spaces/{id}/buyers", { params });
}
/** Retrieve Tweets from a Space. */
spaceTweets(params: { "id": string; "max_results"?: number; "tweet.fields"?: unknown[]; "expansions"?: unknown[]; "media.fields"?: unknown[]; "poll.fields"?: unknown[]; "user.fields"?: unknown[]; "place.fields"?: unknown[] }): Promise<any> {
return this._request("GET", "/2/spaces/{id}/tweets", { params });
}
/** Tweet lookup by Tweet IDs */
findTweetsById(params: { "ids": unknown[]; "tweet.fields"?: unknown[]; "expansions"?: unknown[]; "media.fields"?: unknown[]; "poll.fields"?: unknown[]; "user.fields"?: unknown[]; "place.fields"?: unknown[] }): Promise<any> {
return this._request("GET", "/2/tweets", { params });
}
/** Creation of a Tweet */
createTweet(body: unknown): Promise<any> {
return this._request("POST", "/2/tweets", { body });
}
/** Tweets Compliance stream */
getTweetsComplianceStream(params: { "partition": number; "backfill_minutes"?: number; "start_time"?: string; "end_time"?: string }): Promise<any> {
return this._request("GET", "/2/tweets/compliance/stream", { params });
}
/** Full archive search counts */
tweetCountsFullArchiveSearch(params: { "query": string; "start_time"?: string; "end_time"?: string; "since_id"?: string; "until_id"?: string; "next_token"?: string; "pagination_token"?: string; "granularity"?: string; "search_count.fields"?: unknown[] }): Promise<any> {
return this._request("GET", "/2/tweets/counts/all", { params });
}
/** Recent search counts */
tweetCountsRecentSearch(params: { "query": string; "start_time"?: string; "end_time"?: string; "since_id"?: string; "until_id"?: string; "next_token"?: string; "pagination_token"?: string; "granularity"?: string; "search_count.fields"?: unknown[] }): Promise<any> {
return this._request("GET", "/2/tweets/counts/recent", { params });
}
/** Firehose stream */
getTweetsFirehoseStream(params: { "partition": number; "backfill_minutes"?: number; "start_time"?: string; "end_time"?: string; "tweet.fields"?: unknown[]; "expansions"?: unknown[]; "media.fields"?: unknown[]; "poll.fields"?: unknown[]; "user.fields"?: unknown[]; "place.fields"?: unknown[] }): Promise<any> {
return this._request("GET", "/2/tweets/firehose/stream", { params });
}
/** Tweets Label stream */
getTweetsLabelStream(params: { "backfill_minutes"?: number; "start_time"?: string; "end_time"?: string }): Promise<any> {
return this._request("GET", "/2/tweets/label/stream", { params });
}
/** Sample stream */
sampleStream(params: { "backfill_minutes"?: number; "tweet.fields"?: unknown[]; "expansions"?: unknown[]; "media.fields"?: unknown[]; "poll.fields"?: unknown[]; "user.fields"?: unknown[]; "place.fields"?: unknown[] }): Promise<any> {
return this._request("GET", "/2/tweets/sample/stream", { params });
}
/** Sample 10% stream */
getTweetsSample10Stream(params: { "partition": number; "backfill_minutes"?: number; "start_time"?: string; "end_time"?: string; "tweet.fields"?: unknown[]; "expansions"?: unknown[]; "media.fields"?: unknown[]; "poll.fields"?: unknown[]; "user.fields"?: unknown[]; "place.fields"?: unknown[] }): Promise<any> {
return this._request("GET", "/2/tweets/sample10/stream", { params });
}
/** Full-archive search */
tweetsFullarchiveSearch(params: { "query": string; "start_time"?: string; "end_time"?: string; "since_id"?: string; "until_id"?: string; "max_results"?: number; "next_token"?: string; "pagination_token"?: string; "sort_order"?: string; "tweet.fields"?: unknown[]; "expansions"?: unknown[]; "media.fields"?: unknown[]; "poll.fields"?: unknown[]; "user.fields"?: unknown[]; "place.fields"?: unknown[] }): Promise<any> {
return this._request("GET", "/2/tweets/search/all", { params });
}
/** Recent search */
tweetsRecentSearch(params: { "query": string; "start_time"?: string; "end_time"?: string; "since_id"?: string; "until_id"?: string; "max_results"?: number; "next_token"?: string; "pagination_token"?: string; "sort_order"?: string; "tweet.fields"?: unknown[]; "expansions"?: unknown[]; "media.fields"?: unknown[]; "poll.fields"?: unknown[]; "user.fields"?: unknown[]; "place.fields"?: unknown[] }): Promise<any> {
return this._request("GET", "/2/tweets/search/recent", { params });
}
/** Filtered stream */
searchStream(params: { "backfill_minutes"?: number; "start_time"?: string; "end_time"?: string; "tweet.fields"?: unknown[]; "expansions"?: unknown[]; "media.fields"?: unknown[]; "poll.fields"?: unknown[]; "user.fields"?: unknown[]; "place.fields"?: unknown[] }): Promise<any> {
return this._request("GET", "/2/tweets/search/stream", { params });
}
/** Rules lookup */
getRules(params: { "ids"?: unknown[]; "max_results"?: number; "pagination_token"?: string }): Promise<any> {
return this._request("GET", "/2/tweets/search/stream/rules", { params });
}
/** Add/Delete rules */
addOrDeleteRules(body: unknown, params: { "dry_run"?: boolean }): Promise<any> {
return this._request("POST", "/2/tweets/search/stream/rules", { body, params });
}
/** Tweet lookup by Tweet ID */
findTweetById(params: { "id": string; "tweet.fields"?: unknown[]; "expansions"?: unknown[]; "media.fields"?: unknown[]; "poll.fields"?: unknown[]; "user.fields"?: unknown[]; "place.fields"?: unknown[] }): Promise<any> {
return this._request("GET", "/2/tweets/{id}", { params });
}
/** Tweet delete by Tweet ID */
deleteTweetById(params: { "id": string }): Promise<any> {
return this._request("DELETE", "/2/tweets/{id}", { params });
}
/** Returns User objects that have liked the provided Tweet ID */
tweetsIdLikingUsers(params: { "id": string; "max_results"?: number; "pagination_token"?: string; "user.fields"?: unknown[]; "expansions"?: unknown[]; "tweet.fields"?: unknown[] }): Promise<any> {
return this._request("GET", "/2/tweets/{id}/liking_users", { params });
}
/** Retrieve Tweets that quote a Tweet. */
findTweetsThatQuoteATweet(params: { "id": string; "max_results"?: number; "pagination_token"?: string; "exclude"?: unknown[]; "tweet.fields"?: unknown[]; "expansions"?: unknown[]; "media.fields"?: unknown[]; "poll.fields"?: unknown[]; "user.fields"?: unknown[]; "place.fields"?: unknown[] }): Promise<any> {
return this._request("GET", "/2/tweets/{id}/quote_tweets", { params });
}
/** Returns User objects that have retweeted the provided Tweet ID */
tweetsIdRetweetingUsers(params: { "id": string; "max_results"?: number; "pagination_token"?: string; "user.fields"?: unknown[]; "expansions"?: unknown[]; "tweet.fields"?: unknown[] }): Promise<any> {
return this._request("GET", "/2/tweets/{id}/retweeted_by", { params });
}
/** Hide replies */
hideReplyById(body: unknown, params: { "tweet_id": string }): Promise<any> {
return this._request("PUT", "/2/tweets/{tweet_id}/hidden", { body, params });
}
/** User lookup by IDs */
findUsersById(params: { "ids": unknown[]; "user.fields"?: unknown[]; "expansions"?: unknown[]; "tweet.fields"?: unknown[] }): Promise<any> {
return this._request("GET", "/2/users", { params });
}
/** User lookup by usernames */
findUsersByUsername(params: { "usernames": unknown[]; "user.fields"?: unknown[]; "expansions"?: unknown[]; "tweet.fields"?: unknown[] }): Promise<any> {
return this._request("GET", "/2/users/by", { params });
}
/** User lookup by username */
findUserByUsername(params: { "username": string; "user.fields"?: unknown[]; "expansions"?: unknown[]; "tweet.fields"?: unknown[] }): Promise<any> {
return this._request("GET", "/2/users/by/username/{username}", { params });
}
/** Users Compliance stream */
getUsersComplianceStream(params: { "partition": number; "backfill_minutes"?: number; "start_time"?: string; "end_time"?: string }): Promise<any> {
return this._request("GET", "/2/users/compliance/stream", { params });
}
/** User lookup me */
findMyUser(params: { "user.fields"?: unknown[]; "expansions"?: unknown[]; "tweet.fields"?: unknown[] }): Promise<any> {
return this._request("GET", "/2/users/me", { params });
}
/** User lookup by ID */
findUserById(params: { "id": string; "user.fields"?: unknown[]; "expansions"?: unknown[]; "tweet.fields"?: unknown[] }): Promise<any> {
return this._request("GET", "/2/users/{id}", { params });
}
/** Returns User objects that are blocked by provided User ID */
usersIdBlocking(params: { "id": string; "max_results"?: number; "pagination_token"?: string; "user.fields"?: unknown[]; "expansions"?: unknown[]; "tweet.fields"?: unknown[] }): Promise<any> {
return this._request("GET", "/2/users/{id}/blocking", { params });
}
/** Block User by User ID */
usersIdBlock(body: unknown, params: { "id": string }): Promise<any> {
return this._request("POST", "/2/users/{id}/blocking", { body, params });
}
/** Bookmarks by User */
getUsersIdBookmarks(params: { "id": string; "max_results"?: number; "pagination_token"?: string; "tweet.fields"?: unknown[]; "expansions"?: unknown[]; "media.fields"?: unknown[]; "poll.fields"?: unknown[]; "user.fields"?: unknown[]; "place.fields"?: unknown[] }): Promise<any> {
return this._request("GET", "/2/users/{id}/bookmarks", { params });
}
/** Add Tweet to Bookmarks */
postUsersIdBookmarks(body: unknown, params: { "id": string }): Promise<any> {
return this._request("POST", "/2/users/{id}/bookmarks", { body, params });
}
/** Remove a bookmarked Tweet */
usersIdBookmarksDelete(params: { "id": string; "tweet_id": string }): Promise<any> {
return this._request("DELETE", "/2/users/{id}/bookmarks/{tweet_id}", { params });
}
/** Get User's Followed Lists */
userFollowedLists(params: { "id": string; "max_results"?: number; "pagination_token"?: string; "list.fields"?: unknown[]; "expansions"?: unknown[]; "user.fields"?: unknown[] }): Promise<any> {
return this._request("GET", "/2/users/{id}/followed_lists", { params });
}
/** Follow a List */
listUserFollow(body: unknown, params: { "id": string }): Promise<any> {
return this._request("POST", "/2/users/{id}/followed_lists", { body, params });
}
/** Unfollow a List */
listUserUnfollow(params: { "id": string; "list_id": string }): Promise<any> {
return this._request("DELETE", "/2/users/{id}/followed_lists/{list_id}", { params });
}
/** Followers by User ID */
usersIdFollowers(params: { "id": string; "max_results"?: number; "pagination_token"?: string; "user.fields"?: unknown[]; "expansions"?: unknown[]; "tweet.fields"?: unknown[] }): Promise<any> {
return this._request("GET", "/2/users/{id}/followers", { params });
}
/** Following by User ID */
usersIdFollowing(params: { "id": string; "max_results"?: number; "pagination_token"?: string; "user.fields"?: unknown[]; "expansions"?: unknown[]; "tweet.fields"?: unknown[] }): Promise<any> {
return this._request("GET", "/2/users/{id}/following", { params });
}
/** Follow User */
usersIdFollow(body: unknown, params: { "id": string }): Promise<any> {
return this._request("POST", "/2/users/{id}/following", { body, params });
}
/** Returns Tweet objects liked by the provided User ID */
usersIdLikedTweets(params: { "id": string; "max_results"?: number; "pagination_token"?: string; "tweet.fields"?: unknown[]; "expansions"?: unknown[]; "media.fields"?: unknown[]; "poll.fields"?: unknown[]; "user.fields"?: unknown[]; "place.fields"?: unknown[] }): Promise<any> {
return this._request("GET", "/2/users/{id}/liked_tweets", { params });
}
/** Causes the User (in the path) to like the specified Tweet */
usersIdLike(body: unknown, params: { "id": string }): Promise<any> {
return this._request("POST", "/2/users/{id}/likes", { body, params });
}
/** Causes the User (in the path) to unlike the specified Tweet */
usersIdUnlike(params: { "id": string; "tweet_id": string }): Promise<any> {
return this._request("DELETE", "/2/users/{id}/likes/{tweet_id}", { params });
}
/** Get a User's List Memberships */
getUserListMemberships(params: { "id": string; "max_results"?: number; "pagination_token"?: string; "list.fields"?: unknown[]; "expansions"?: unknown[]; "user.fields"?: unknown[] }): Promise<any> {
return this._request("GET", "/2/users/{id}/list_memberships", { params });
}
/** User mention timeline by User ID */
usersIdMentions(params: { "id": string; "since_id"?: string; "until_id"?: string; "max_results"?: number; "pagination_token"?: string; "start_time"?: string; "end_time"?: string; "tweet.fields"?: unknown[]; "expansions"?: unknown[]; "media.fields"?: unknown[]; "poll.fields"?: unknown[]; "user.fields"?: unknown[]; "place.fields"?: unknown[] }): Promise<any> {
return this._request("GET", "/2/users/{id}/mentions", { params });
}
/** Returns User objects that are muted by the provided User ID */
usersIdMuting(params: { "id": string; "max_results"?: number; "pagination_token"?: string; "user.fields"?: unknown[]; "expansions"?: unknown[]; "tweet.fields"?: unknown[] }): Promise<any> {
return this._request("GET", "/2/users/{id}/muting", { params });
}
/** Mute User by User ID. */
usersIdMute(body: unknown, params: { "id": string }): Promise<any> {
return this._request("POST", "/2/users/{id}/muting", { body, params });
}
/** Get a User's Owned Lists. */
listUserOwnedLists(params: { "id": string; "max_results"?: number; "pagination_token"?: string; "list.fields"?: unknown[]; "expansions"?: unknown[]; "user.fields"?: unknown[] }): Promise<any> {
return this._request("GET", "/2/users/{id}/owned_lists", { params });
}
/** Get a User's Pinned Lists */
listUserPinnedLists(params: { "id": string; "list.fields"?: unknown[]; "expansions"?: unknown[]; "user.fields"?: unknown[] }): Promise<any> {
return this._request("GET", "/2/users/{id}/pinned_lists", { params });
}
/** Pin a List */
listUserPin(body: unknown, params: { "id": string }): Promise<any> {
return this._request("POST", "/2/users/{id}/pinned_lists", { body, params });
}
/** Unpin a List */
listUserUnpin(params: { "id": string; "list_id": string }): Promise<any> {
return this._request("DELETE", "/2/users/{id}/pinned_lists/{list_id}", { params });
}
/** Causes the User (in the path) to retweet the specified Tweet. */
usersIdRetweets(body: unknown, params: { "id": string }): Promise<any> {
return this._request("POST", "/2/users/{id}/retweets", { body, params });
}
/** Causes the User (in the path) to unretweet the specified Tweet */
usersIdUnretweets(params: { "id": string; "source_tweet_id": string }): Promise<any> {
return this._request("DELETE", "/2/users/{id}/retweets/{source_tweet_id}", { params });
}
/** User home timeline by User ID */
usersIdTimeline(params: { "id": string; "since_id"?: string; "until_id"?: string; "max_results"?: number; "pagination_token"?: string; "exclude"?: unknown[]; "start_time"?: string; "end_time"?: string; "tweet.fields"?: unknown[]; "expansions"?: unknown[]; "media.fields"?: unknown[]; "poll.fields"?: unknown[]; "user.fields"?: unknown[]; "place.fields"?: unknown[] }): Promise<any> {
return this._request("GET", "/2/users/{id}/timelines/reverse_chronological", { params });
}
/** User Tweets timeline by User ID */
usersIdTweets(params: { "id": string; "since_id"?: string; "until_id"?: string; "max_results"?: number; "pagination_token"?: string; "exclude"?: unknown[]; "start_time"?: string; "end_time"?: string; "tweet.fields"?: unknown[]; "expansions"?: unknown[]; "media.fields"?: unknown[]; "poll.fields"?: unknown[]; "user.fields"?: unknown[]; "place.fields"?: unknown[] }): Promise<any> {
return this._request("GET", "/2/users/{id}/tweets", { params });
}
/** Unblock User by User ID */
usersIdUnblock(params: { "source_user_id": string; "target_user_id": string }): Promise<any> {
return this._request("DELETE", "/2/users/{source_user_id}/blocking/{target_user_id}", { params });
}
/** Unfollow User */
usersIdUnfollow(params: { "source_user_id": string; "target_user_id": string }): Promise<any> {
return this._request("DELETE", "/2/users/{source_user_id}/following/{target_user_id}", { params });
}
/** Unmute User by User ID */
usersIdUnmute(params: { "source_user_id": string; "target_user_id": string }): Promise<any> {
return this._request("DELETE", "/2/users/{source_user_id}/muting/{target_user_id}", { params });
}
}
export default TwitterAPIv2;
No reviews yet. Be the first to rate this API.
Yes. Twitter API v2 uses bearer authentication, so you bring your own key from the provider. You store it once on OmniStream and the proxy injects it into every call, so your code only ever sends your Omni key.
Twitter API v2 available endpoints It exposes 80 endpoints over GET, POST, PUT, DELETE, including GET /2/compliance/jobs, POST /2/compliance/jobs, GET /2/compliance/jobs/{id}.
Install the OmniStream SDK for your language and call Twitter API v2 through it. The client is generated from this API's OpenAPI spec, so parameters and responses are fully typed, and the same client also calls every other API in the marketplace.
You can start on the free plan. OmniStream charges for the unified SDK, key storage and proxy rather than for Twitter API v2 itself, and Twitter API v2's own rate limits still apply to your provider key.
QuickChart: An API to generate charts and QR codes using QuickChart services.
Send a new message to a user
Send a new message to a DM Conversation
Get DM Events for a DM Conversation
Get recent DM Events
Create List
List lookup by List ID.
Update List.
Delete List
Returns User objects that follow a List by the provided List ID
Returns User objects that are members of a List by the provided List ID.
Add a List member
Remove a List member
List Tweets timeline by List ID.
Returns the OpenAPI Specification document.
Space lookup up Space IDs
Space lookup by their creators
Search for Spaces
Space lookup by Space ID
Retrieve the list of Users who purchased a ticket to the given space
Retrieve Tweets from a Space.
Tweet lookup by Tweet IDs
Creation of a Tweet
Tweets Compliance stream
Full archive search counts
Recent search counts
Firehose stream
Tweets Label stream
Sample stream
Sample 10% stream
Full-archive search
Recent search
Filtered stream
Rules lookup
Add/Delete rules
Tweet lookup by Tweet ID
Tweet delete by Tweet ID
Returns User objects that have liked the provided Tweet ID
Retrieve Tweets that quote a Tweet.
Returns User objects that have retweeted the provided Tweet ID
Hide replies
User lookup by IDs
User lookup by usernames
User lookup by username
Users Compliance stream
User lookup me
User lookup by ID
Returns User objects that are blocked by provided User ID
Block User by User ID
Bookmarks by User
Add Tweet to Bookmarks
Remove a bookmarked Tweet
Get User's Followed Lists
Follow a List
Unfollow a List
Followers by User ID
Following by User ID
Follow User
Returns Tweet objects liked by the provided User ID
Causes the User (in the path) to like the specified Tweet
Causes the User (in the path) to unlike the specified Tweet
Get a User's List Memberships
User mention timeline by User ID
Returns User objects that are muted by the provided User ID
Mute User by User ID.
Get a User's Owned Lists.
Get a User's Pinned Lists
Pin a List
Unpin a List
Causes the User (in the path) to retweet the specified Tweet.
Causes the User (in the path) to unretweet the specified Tweet
User home timeline by User ID
User Tweets timeline by User ID
Unblock User by User ID
Unfollow User
Unmute User by User ID