dilame / instagram-private-api

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

trying any of the examples provided in example folder - getting error #1526

Open IzaGz opened 3 years ago

IzaGz commented 3 years ago
ode:25823) UnhandledPromiseRejectionWarning: IgResponseError: POST /api/v1/qe/sync/ - 429 Too Many Requests; 
    at Request.handleResponseError (/node_modules/instagram-private-api/dist/core/request.js:125:16)
    at Request.send (/node_modules/instagram-private-api/dist/core/request.js:53:28)
    at async QeRepository.sync (/node_modules/instagram-private-api/dist/repositories/qe.repository.js:28:26)
    at async AccountRepository.login (/node_modules/instagram-private-api/dist/repositories/account.repository.js:13:13)
    at async asdfsdaf (file:////index.js:88:16)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:25823) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:25823) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
sostenesapollo commented 3 years ago

try to npm i and npx ts-node examples/realtime.example.ts inside of the cloned repo I'm using the version v14.17.4 and it's working fine.

Don't forget to provide your credentials

keharv commented 3 years ago

The error generally denotes a rate-limit has been reached; I encountered this issue after logging into the same account repeatedly.

Solution

->Delete your session ->Change your IP ->Try again

If it still isn't working, then the account is temporarily locked, and you'll have to wait for it to be unlocked, or use a different account.

pcurz commented 2 years ago

Yes, for too many logins you must wait 24 hrs.