dilame / instagram-private-api

NodeJS Instagram private API SDK. Written in TypeScript.
MIT License
5.93k stars 1.14k forks source link

[Assist required] Checkpoint StatusCodeError 301 #188

Closed IvanMMM closed 7 years ago

IvanMMM commented 7 years ago

I got this kind of error after trying to request sms code from insta. Did insta changed something?

{"statusCode":301,"body":"","headers":{"content-type":"text/html; charset=utf-8","location":"https://www.instagram.com/challenge/","cache-control":"private, no-cache, no-store, must-revalidate","pragma":"no-cache","expires":"Sat, 01 Jan 2000 00:00:00 GMT","vary":"Cookie, Accept-Language","content-language":"en","date":"Wed, 05 Apr 2017 12:00:25 GMT","set-cookie":["rur=ASH; Path=/","csrftoken=eNwlM6N5K18l4g5zX7WuFcGhCsfXvqPa; expires=Wed, 04-Apr-2018 12:00:25 GMT; Max-Age=31449600; Path=/; Secure"],"connection":"close","content-length":"0"},"request":{"uri":{"protocol":"https:","slashes":true,"auth":null,"host":"i.instagram.com","port":443,"hostname":"i.instagram.com","hash":null,"search":null,"query":null,"pathname":"/challenge/","path":"/challenge/","href":"https://i.instagram.com/challenge/"},"method":"POST","headers":{"Accept-Language":"en-US","Host":"i.instagram.com","Accept":"*/*","Accept-Encoding":"gzip, deflate, sdch","Connection":"Close","User-Agent":"Instagram 10.8.0 Android (18/4.0.4; 515dpi; 2560x1440; TCT (Alcatel); ALCATEL_one_touch_908S; one_touch_908S_gsm; en_US)","Upgrade-Insecure-Requests":"1","Cache-Control":"no-cache","Pragma":"no-cache","Referer":"https://i.instagram.com/challenge/","Origin":"https://i.instagram.com","cookie":"rur=ASH; csrftoken=eNwlM6N5K18l4g5zX7WuFcGhCsfXvqPa; mid=WOEL9QABAAEt_P8jqwlixBSrct_j; ds_user=god.umor; sessionid=IGSC6a9064ddf85a026e527f4662b03f52cc0249998416025ad8aac116ea2a584f5c%3AhjuAoWKGtQCyrXDxVlW7rdsX7RetAf9I%3A%7B%22_auth_user_backend%22%3A%22accounts.backends.CaseInsensitiveModelBackend%22%2C%22_platform%22%3A1%2C%22_auth_user_id%22%3A2503937805%2C%22last_refreshed%22%3A1491378538.6623084545%2C%22_auth_user_hash%22%3A%22%22%2C%22_token_ver%22%3A2%2C%22_token%22%3A%222503937805%3AFKsBx1FsgjDaUoRdDQqR0umsxA69GkBP%3Abc5cffdae44dd562a98b33c0b55f168243a7246b8a30ead4e1b0219059baa870%22%2C%22asns%22%3A%7B%2231.31.192.95%22%3A197695%2C%22time%22%3A1491243700%7D%7D; ds_user_id=2503937805; is_starred_enabled=yes","content-type":"application/x-www-form-urlencoded","content-length":80}}}
IvanMMM commented 7 years ago

Well, looks like insta changed domain from i.instagram.com to www.instagram.com while resolving checkpoints. Changing followRedirect: 'false' to 'true' helps a little, but we still got 301 after resetting. I'v changed HOSTNAME to WEB_HOSTNAME and replaced urls in checkpoint from 'i' to 'www', but now I got plenty other errors :)

IvanMMM commented 7 years ago

Alright, looks like we need to rewrite this checkpoint system. Checkpointed accounts required for testing pls :)

IvanMMM commented 7 years ago

Probably fixed in #199