Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can I create this? #1

Open
ramtinak opened this issue Jul 30, 2023 · 0 comments
Open

Can I create this? #1

ramtinak opened this issue Jul 30, 2023 · 0 comments

Comments

@ramtinak
Copy link
Owner

ramtinak commented Jul 30, 2023

Can I create this?

Maybe

Since Instagram uses new api called bloks api, I'm preparing InstagramApiSharp's library to use this api.
Currently most of challenges and changing password uses bloks api, but in newer version Instagram uses api this for login part as well.

As I checked Threads app's packets for login part only, it seems uses the exact bloks api from Instagram, so it is possible to make use of InstagramApiSharp's library.

Now I have question, should I use InstagramApiSharp's library for login part and migrate its data to ThreadsApiSharp's library? or add the login part to ThreadsApiSharp's library as well?

Problems

  • If I wanted to add the login part to ThreadsApiSharp, I have to double check for everything and I don't think it's logical to do something like this.
  • Reading Bloks api's response is hard, because it has a lot of nonsense, currently I'm using Substring/IndexOf since it's hard to create a wrapper for it's response

image

Learning part

Each bloks api requests looks like this:

params=PARAMETERS&bk_client_context={"bloks_version":"9de54335a516a20dc08018bc3a317ec1a859821fe610ed57b5994052d68f92e6","styles_id":"instagram"}&bloks_versioning_id=9de54335a516a20dc08018bc3a317ec1a859821fe610ed57b5994052d68f92e6

Visual version;

params			=>	PARAMETERS

bk_client_context	=>	{"bloks_version":"9de54335a516a20dc08018bc3a317ec1a859821fe610ed57b5994052d68f92e6","styles_id":"instagram"}

bloks_versioning_id	=>	9de54335a516a20dc08018bc3a317ec1a859821fe610ed57b5994052d68f92e6

Login api

// POST https://i.instagram.com/api/v1/bloks/apps/com.bloks.www.bloks.caa.login.async.send_login_request/
{
  "client_input_params": {
    "device_id": "android-", // device id
    "login_attempt_count": 1, // dont change
    "secure_family_device_id": "", // dont change
    "machine_id": "X-Mid Header",
    "accounts_list": [], // dont change
    "auth_secure_device_id": "", // dont change
    "password": "ENCRYPTED PASSWORD",
    "family_device_id": "FAMILY DEVICE ID", // FamilyDeviceGuid
    "fb_ig_device_id": [], // dont change
    "device_emails": [], // dont change
    "try_num": 1,
    "event_flow": "login_manual", // dont change
    "event_step": "home_page", // dont change
    "openid_tokens": {}, // dont change
    "client_known_key_hash": "", // dont change
    "contact_point": "USERNAME",
    "encrypted_msisdn": "" // dont change
  },
  "server_params": {
    "should_trigger_override_login_2fa_action": 0, // dont change
    "username_text_input_id": "v7chy0:53", // came from last request
    "device_id": "android-", // device id
    "should_trigger_override_login_success_action": 0, // dont change
    "server_login_source": "login", // dont change
    "waterfall_id": "", // random guid
    "login_source": "Login", // dont change
    "INTERNAL__latency_qpl_instance_id": 188679189600332, // came from last request
    "reg_flow_source": "login_home_native_integration_point", // dont change
    "is_platform_login": 0, // dont change
    "is_caa_perf_enabled": 1, // dont change
    "credential_type": "password", // dont change
    "family_device_id": "FAMILY DEVICE ID", // FamilyDeviceGuid
    "INTERNAL__latency_qpl_marker_id": 36707139, // came from last request
    "offline_experiment_group": "caa_iteration_v3_perf_ig_4", // dont change
    "INTERNAL_INFRA_THEME": "harm_f", // dont change
    "password_text_input_id": "v7chy0:54", // came from last request
    "qe_device_id": "Device _uuid", // DevieGuid
    "ar_event_source": "login_home_page" // dont change
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant