Closed ElectroMyStyle closed 4 years ago
if you remove it and update the key even if it is available
No. This isn't really a good solution. Imo this check shouldn't be there, it's only there so we don't have thousands of issues asking on how to get the key. However I get the problem you're facing and you can pretty much fix it by calling ig.qe.syncLoginExperiments()
yourself. Keep in mind repositories are supposed to do one thing, one API call. This is an exception.
Okay, thanks. Can be closed.
Hello. I authorize my account and save its session data to a file:
Then I use the session. Every time I run the script I add it to the object and log in to the account:
The session file stores various data, but the problem is with the password encryption key
passwordEncryptionPubKey
andpasswordEncryptionKeyId
, or rather their version. Over time, these data are not updated in the session file and the subsequent authorization through session (over a period of time: several days or weeks), when Instagram updated the data on its servers, Instagram sends an error that the authorization data is incorrect and returns aHTTP 400
. Since the password is encrypted with the old key from the session file.At the moment, in the
repositories/AccountRepository.js
in the method login() line 26 should check for the encryption key, if you remove it and update the key even if it is available, I think the problem will be resolved. However, thelogin()
method is called only when the script is run (often once), and it would not be superfluous to update the key and its version, especially when using old sessions for authorization.