junhoyeo / threads-api

Unofficial, Reverse-Engineered Node.js/TypeScript client for Meta's Threads. Web UI Included.
https://threads.junho.io
MIT License
1.59k stars 134 forks source link

[api] reduce calls to getUserIDfromUsername #99

Closed yssf-io closed 1 year ago

yssf-io commented 1 year ago

For some reason, getUserIDfromUsername fails when the calls are coming from AWS EC2 (Insta sends something else that doesn't contain the userID)

I have a solution in mind that I'll push a bit later, but for now here's the code to pass optionally userID to the constructor and avoid calling getUserIDfromUsername in publish. That way users can still run the API if they know their userIDs.