Emulate any client
Choose which Twitter client to impersonate β Web, Android, iPhone, TweetDeck, or more β each with correct bearer tokens and HTTP fingerprints.
Log in and interact with the unofficial X API using any client identity β web, Android, iOS, or TweetDeck
Install the package and start interacting with Twitter in just a few lines:
bun add emusksimport Emusks from "emusks";
const client = new Emusks();
await client.login("your_auth_token");
const tweet = await client.tweets.create("Hello from emusks! π");
console.log(`i tweeted to https://x.com/i/status/${tweet.id}`);
// like the tweet
await client.tweets.like(tweet.id);
// get a user
const user = await client.users.getByUsername("elonmusk");
console.log(`${user.name} has ${user.stats.followers.count} followers`);
// follow them
await client.users.follow(user.id);
// search for tweets
const results = await client.search.tweets("javascript");
// get your home timeline
const home = await client.timelines.home();client.tweetsCreate, delete, like, retweet, pin, and schedule tweetsclient.timelinesHome feed, user tweets, media, likes, and highlightsclient.usersGet profiles, follow, block, mute, and manage relationshipsclient.dmsInbox, conversations, search, and message managementclient.searchSearch tweets, users, media, lists, and communitiesclient.bookmarksBookmark tweets, manage folders, and search saved contentclient.listsCreate, manage, and subscribe to curated listsclient.communitiesJoin, create, moderate, and explore communitiesclient.spacesGet details, search, and subscribe to live audio roomsclient.trendsExplore trending topics, locations, and AI summariesclient.topicsFollow, unfollow, and discover topics of interestclient.accountSettings, security, sessions, 2FA, and preferencesclient.notificationsNotification timeline, badges, and push settingsclient.mediaMedia metadata, alt text, and subtitle management