threads-api
threads-api copied to clipboard
Cannot read properties of undefined (reading 'split')
i want use like and post method but something error
TypeError: Cannot read properties of undefined (reading 'split')
at d.
Having the same issue! Any progress with it @onesyah05 ?
I’m pretty sure that the Threads team changed how auth works
I made an issue before documenting what I found https://github.com/junhoyeo/threads-api/issues/113
need to encrypt password before send login request start with #PWD_INSTAGRAM:{keyId}:{time}:{ecnryptedpassword}. public key is stored hardcode on the app with keyId.
this is reference for implementation: https://github.com/dilame/instagram-private-api/blob/master/src/repositories/account.repository.ts, all the logic same with ig authorization.
@aldinp16 how do you get the keyId it seems like within the instagram-private-api it's hard coded to 4?
@francistogram try to open the apk with jadx, the key id is harcoded on apk with the public key for generate encrypted password
public C95815gG() {
this.A00 = 41;
this.A02 = "-----BEGIN PUBLIC KEY-----\n*****-----END PUBLIC KEY-----\n";
Calendar.getInstance().getTimeInMillis();
this.A01 = AnonymousClass006.A00;
}
even though the request uses key 1 (#PWD_INSTAGRAM:1:{time}:{ecnryptedpassword}), in fact it uses key 41 to encrypt it
@francistogram @aldinp16 Thank you guys for the research, will try to draft an quick implementation in a few hours
@junhoyeo This other Threads library seems to have fixed this issue in this commit, it may be inspiring for your implementation: https://github.com/threadsjs/threads.js/commit/975abe82789c891815d0ef7128051bb1b30023f0
almost done!
Thanks to everyone, It was released in v1.4.0! 👍
Sorry to comment on a closed issue, but I'm still experiencing this after updating to v1.4.0. Is anyone else still experiencing the issue?
ERROR (threads/64596): Cannot read properties of undefined (reading 'split')
TypeError: Cannot read properties of undefined (reading 'split')