m1guelpf / threads-re

Reverse-engineering Instagram's Threads private APIs.
https://www.threads.net/t/Cua2iFqorJa/
321 stars 19 forks source link

Get Auth Token Flow is Failing #10

Open francistogram opened 1 year ago

francistogram commented 1 year ago

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"}

With email / passwords that did use to work

image
xuancongwen commented 1 year ago

I believe I'm getting a similar issue.

$ USERNAME=[REDACTED] PASSWORD=[REDACTED] DEVICE_ID=ios-1234567890ABC curl --request POST \
  --url 'https://i.instagram.com/api/v1/bloks/apps/com.bloks.www.bloks.caa.login.async.send_login_request/' \
  --header 'user-agent: Barcelona 289.0.0.77.109 Android' \
  --header 'sec-fetch-site: same-origin' \
  --header 'content-type: application/x-www-form-urlencoded; charset=UTF-8' \
  --data 'params={"client_input_params":{"password":"$PASSWORD","contact_point":"$USERNAME","device_id":"$DEVICE_ID"},"server_params":{"credential_type":"password","device_id":"$DEVICE_ID"}}' \
  --data 'bloks_versioning_id=00ba6fa565c3c707243ad976fa30a071a625f2a3d158d9412091176fe35027d8'

I'm getting back a similar result:

{"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\":\"AN0A4lDY0M2lcUGfNhF140G\"}"},"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\", \"7ad75682-9147-47d2-a721-def38f80a944\", \"home_page\", (ig.action.IsDarkModeEnabled), (bk.action.i32.Const, 0), \"\", \"\", (bk.action.map.Make, (bk.action.array.Make), (bk.action.array.Make)), \"\", \"\", \"25eca3bc-ec80-4605-bb4d-f8038609c7c8\")), (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"}

I'm going to do a little more testing to see if they're now doing some kind of filtering on the device id, since the one I'm using is obviously fudged.

milanmdev commented 3 months ago

Has anyone found a solution to this? Not working for me either.