m1guelpf / threads-re Goto Github PK
View Code? Open in Web Editor NEWReverse-engineering Instagram's Threads private APIs.
Home Page: https://www.threads.net/t/Cua2iFqorJa/
Reverse-engineering Instagram's Threads private APIs.
Home Page: https://www.threads.net/t/Cua2iFqorJa/
Based on my observation and experience using the app, I believe it was developed using React Native. However, the app's performance and overall feel are so seamless and native-like that it's hard to believe it's built with React Native. I'm intrigued by the methods they employed to achieve this level of quality and would love to understand their approach in more detail.
Hi,
Can you consider making walk through with threads? I mean message threads, like in chat box not meta platform :D Meta uses that on facebook and instagram in websockets, so it's more tough for most of us, but maybe you have enough skills to show us any examples? My idea is getting threads id and getting pagination here to get more results. Probably it requires getting cursor value and doing something with it.
Hi @m1guelpf, bit of a joke, I have such a headache when it comes to reverse-engineering.
Maybe you can help me get additional endpoints for instagram accounts that have 2-factor authentication enabled.
I got some keys one of which is two_factor_identifier
, but I don't know which other endpoint I should request.
Hi, reversing the web version is of course no problem, but how to reverse the Threads application, I can't figure out. I used httptoolkit, which could not decode the https traffic. I also used fiddler, which did not show the requests normally. So I would be very grateful if you could explain how you were able to sniff the traffic, or maybe link to the tutorial you did.
As in the subject, I tried but can't get followers and following doc_ids. Can you try to find these? If you can or can't, please tell me about your method.
Hi, thanks for the great resource!
I am curious, how exactly do you paginate through the data using this doc_id
approach? For example with the liking users 9360915773983802
-- is there a variable to pass to get the next page of results? I tried page: 2
and after: <user_id>
along with the mediaID but they don't seem to do anything.
Thank you!
is there a way to get a list of ppl not following u back?
great job ๐
Is it normal that I get html response instead of json? Trying to paste this in the console
curl --request POST \
--url https://www.threads.net/api/graphql \
--header 'user-agent: threads-client' \
--header 'x-ig-app-id: 238260118697367' \
--header 'content-type: application/x-www-form-urlencoded' \
--data 'variables={"userID":"314216"}' \
--data doc_id=23996318473300828
gives me HTML response. Am I missing something? I already changed userID and doc_id etc but no luck
I imagine the Threads team modified how auth works but now the response I get back is
{"layout":{"bloks_payload":{"data":[],"props":[{"id":"-6917714003244327204","name":"ttrc_instance_id"},{"id":"2231046902902521263","name":"override_login_success_action"}],"error_attribution":{"logging_id":"{\"callsite\":\"{\\\"product\\\":\\\"bloks_caa_login\\\",\\\"feature\\\":\\\"com.bloks.www.bloks.caa.login.async.send_login_request\\\",\\\"integration\\\":\\\"bloks_screen\\\",\\\"oncall\\\":\\\"caa_login\\\"}\",\"push_phase\":\"C3\",\"version\":1,\"request_id\":\"ART4gxH0zzo2SJiUV7jumw3\"}"},"tree":{"ใ":{"#":" (bk.action.core.TakeLast, (bk.action.dialog.OpenDialog, (bk.action.bloks.InflateSync, (bk.action.map.Make, (bk.action.array.Make, \"\\u35e7\"), (bk.action.array.Make, (bk.action.map.Make, (bk.action.array.Make, \"(\", \"#\", \"$\", \"*\"), (bk.action.array.Make, \"Unable to log in\", \"An unexpected error occurred. Please try logging in again.\", (bk.action.map.Make, (bk.action.array.Make, \"\\u35e8\"), (bk.action.array.Make, (bk.action.map.Make, (bk.action.array.Make, \"$\", \"#\"), (bk.action.array.Make, \"OK\", (bk.action.core.FuncConst, (bk.action.logging.LogEvent, \"caa_login_client_events_ig\", \"\", (bk.action.map.Make, (bk.action.array.Make, \"core\", \"login_params\"), (bk.action.array.Make, (bk.action.map.Make, (bk.action.array.Make, \"event\", \"event_category\", \"event_flow\", \"event_request_id\", \"event_step\", \"is_dark_mode\", \"exception_code\", \"exception_message\", \"exception_type\", \"extra_client_data\", \"logged_out_identifier\", \"logged_in_identifier\", \"waterfall_id\"), (bk.action.array.Make, \"login_error_dialog_ok_clicked\", \"login_home_page_interaction\", \"login_manual\", \"4b019ef2-c3e2-4b03-8ecc-25379e661f80\", \"home_page\", (ig.action.IsDarkModeEnabled), (bk.action.i32.Const, 0), \"\", \"\", (bk.action.map.Make, (bk.action.array.Make), (bk.action.array.Make)), \"\", \"\", \"62fd26b6-35c9-4d1c-9482-d7b398a9309c\")), (bk.action.map.Make, (bk.action.array.Make), (bk.action.array.Make)))))))))), (bk.action.i32.Const, 0)))))), (bk.action.bloks.InflateSync, (bk.action.map.Make, (bk.action.array.Make, \"\\u35f0\"), (bk.action.array.Make, (bk.action.map.Make, (bk.action.array.Make), (bk.action.array.Make)))))), (bk.action.map.Make, (bk.action.array.Make, \"should_dismiss_loading\"), (bk.action.array.Make, (bk.action.bool.Const, true))))"}}}},"status":"ok"}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.