Skip to content

Commit

Permalink
Merge pull request #1938 from zekhoi/master
Browse files Browse the repository at this point in the history
Fix signup feature
  • Loading branch information
subzeroid authored May 29, 2024
2 parents 1d67627 + d222391 commit 27ca873
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
2 changes: 1 addition & 1 deletion instagrapi/mixins/private.py
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ def _send_private_request(
if endpoint == "/challenge/": # wow so hard, is it safe tho?
endpoint = "/v1/challenge/"

api_url = f"https://{self.domain or config.API_DOMAIN}/api{endpoint}"
api_url = f"https://{domain or config.API_DOMAIN}/api{endpoint}"
self.logger.info(api_url)
if data: # POST
# Client.direct_answer raw dict
Expand Down
8 changes: 1 addition & 7 deletions instagrapi/mixins/signup.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,29 +133,23 @@ def accounts_create(
data = {
"is_secondary_account_creation": "true",
"jazoest": str(int(random.randint(22300, 22399))), # "22341",
"tos_version": "row",
"suggestedUsername": "sn_result",
"do_not_auto_login_if_credentials_match": "false",
"phone_id": self.phone_id,
"enc_password": self.password_encrypt(password),
"username": str(username),
"first_name": str(full_name),
"day": str(day),
"adid": self.adid,
"guid": self.uuid,
"year": str(year),
"device_id": self.device_id,
"_uuid": self.uuid,
"email": email,
"month": str(month),
"sn_nonce": sn_nonce,
"force_sign_up_code": signup_code,
"waterfall_id": self.waterfall_id,
"password": password,
"one_tap_opt_in": "true",
**kwargs,
}
return self.private_request("accounts/create/", data)
return self.private_request("accounts/create/", data, domain= "www.instagram.com")

def challenge_flow(self, data):
data = self.challenge_api(data)
Expand Down

0 comments on commit 27ca873

Please sign in to comment.