Unofficial, Reverse-Engineered Node.js/TypeScript client for Meta's Threads. Web UI Included.
Today, I received a cease and desist letter from Meta, asking me to take this project down. Consequently, I decided to stop future development of this project and related ones:
Warning As of September 8, 2023, the development of the "threads-api" project have been halted and discontinued due to communication received from Meta Platforms, Inc. (βMeta,β previously known as Facebook, Inc.). This repository, along with related projects threads-py and react-threads, has been archived and will no longer receive updates or maintenance. The previous documentation related to this project has been moved to PRESERVED.md as requested.
The "threads-api" was developed for educational and research purposes only. Based on the notification from Meta, it's clear that using or distributing the code might violate the terms of service of Meta Platforms, Inc. and its associated services, including but not limited to Instagram and Threads. Any actions or activities related to the material contained within this repository are solely the user's responsibility. The author and contributors of this repository do not support or condone any unethical or illegal activities.
It was a wonderful journey, and thank you to everyone for being a part of it. Look forward to seeing you in future projects!
π₯Ήβ₯οΈ
These are the final release notes I forgot to update:
Full Changelog: https://github.com/junhoyeo/threads-api/compare/v1.6.3...the-end
this.device
is defined by @aleclarson in https://github.com/junhoyeo/threads-api/pull/281
publish
result with its return type by @aleclarson in https://github.com/junhoyeo/threads-api/pull/284
Full Changelog: https://github.com/junhoyeo/threads-api/compare/v1.6.2...v1.6.3
getUserProfileLoggedIn
and getThreadsLoggedIn
.mute
and unmute
with userID
(required, thanks to @aleclarson) and postID
(optional)block
and unblock
getNotifications
, (update view state) setNotificationsSeen
let data = await threadsAPI.getNotifications(
ThreadsAPI.NotificationFilter.MENTIONS, // {MENTIONS, REPLIES, VERIFIED}
);
if (!data.is_last_page) {
const cursor = data.next_max_id;
data = await threadsAPI.getNotifications(ThreadsAPI.NotificationFilter.MENTIONS, cursor);
}
searchUsers
getRecommendedUsers
ThreadsAPIError
messages by @junhoyeo in https://github.com/junhoyeo/threads-api/pull/279
getRecommended
-> getRecommendedUsers
by @junhoyeo in https://github.com/junhoyeo/threads-api/pull/280
Full Changelog: https://github.com/junhoyeo/threads-api/compare/v1.5.4...v1.6.2
dotenv
to devDependencies by @junhoyeo in https://github.com/junhoyeo/threads-api/pull/241
Full Changelog: https://github.com/junhoyeo/threads-api/compare/v1.5.3...v1.5.4
getToken
to properly return userID
_getProfilePage
-> _getCleanedProfileHTML
getToken
to function correctly by @junhoyeo in https://github.com/junhoyeo/threads-api/pull/225
_getProfilePage
to _getCleanedProfileHTML
by @Aerglonus in https://github.com/junhoyeo/threads-api/pull/227
Full Changelog: https://github.com/junhoyeo/threads-api/compare/v1.5.2...v1.5.3
repository
, Move @swc/cli
and @swc/core
to devDependencies
by @junhoyeo in https://github.com/junhoyeo/threads-api/pull/219
Full Changelog: https://github.com/junhoyeo/threads-api/compare/v1.5.1...v1.5.2
this.httpAgent
/this.httpsAgent
in login
Full Changelog: https://github.com/junhoyeo/threads-api/compare/v1.5.0...v1.5.1
await threadsAPI.publish({
text: 'π€ Threads with Sidecar',
attachment: {
sidecar: [
'https://raw.githubusercontent.com/junhoyeo/threads-api/main/threads-web-ui/app/opengraph-image.jpg?v=2',
'https://github.com/junhoyeo/threads-api/raw/main/.github/cover.jpg',
],
},
});
publish
method's interface has been changed once again! url
and image
options have been deprecated and replaced with a single attachment
option which can be { url }
, { image }
, or { sidecar }
. This is more restrictive as Threads only permit a single rich attachment in the first place.
uploadImage
. πThreadAPI
related types had been refactored into namespace ThreadsAPI
. (See https://github.com/junhoyeo/threads-api/pull/198)attachment.sidecar
publish option by @aleclarson in https://github.com/junhoyeo/threads-api/pull/198
Full Changelog: https://github.com/junhoyeo/threads-api/compare/v1.4.7...v1.5.0
Full Changelog: https://github.com/junhoyeo/threads-api/compare/v1.4.6...v1.4.7
replyControl
option by @aleclarson in https://github.com/junhoyeo/threads-api/pull/184
mimeTypes
import (related to #177) by @sooluh in https://github.com/junhoyeo/threads-api/pull/187
Full Changelog: https://github.com/junhoyeo/threads-api/compare/v1.4.5...v1.4.6