Androz2091 / insta.js

💬 Object-oriented library for sending and receiving messages via Instagram
138 stars 42 forks source link

429 - Please wait a few minutes before you try again. #53

Closed nerkoux closed 3 years ago

nerkoux commented 3 years ago

Application Logs

2021-03-10T00:33:39.746440+00:00 app[worker.1]: (node:4) UnhandledPromiseRejectionWarning: IgResponseError: POST /api/v1/direct_v2/threads/broadcast/text/ - 429 -; Please wait a few minutes before you try again. 2021-03-10T00:33:39.746448+00:00 app[worker.1]: at Request.handleResponseError (/app/node_modules/instagram-private-api/dist/core/request.js:125:16) 2021-03-10T00:33:39.746449+00:00 app[worker.1]: at Request.send (/app/node_modules/instagram-private-api/dist/core/request.js:53:28) 2021-03-10T00:33:39.746450+00:00 app[worker.1]: at async DirectThreadRepository.broadcast (/app/node_modules/instagram-private-api/dist/repositories/direct-thread.repository.js:176:26) 2021-03-10T00:33:39.746450+00:00 app[worker.1]: at async DirectThreadEntity.broadcast (/app/node_modules/instagram-private-api/dist/entities/direct-thread.entity.js:192:26) 2021-03-10T00:33:39.746451+00:00 app[worker.1]: at async DirectThreadEntity.broadcastText (/app/node_modules/instagram-private-api/dist/entities/direct-thread.entity.js:26:16) 2021-03-10T00:33:39.746452+00:00 app[worker.1]: (Use node --trace-warnings ... to show where the warning was created) 2021-03-10T00:33:39.746533+00:00 app[worker.1]: (node:4) 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) 2021-03-10T00:33:39.746595+00:00 app[worker.1]: (node:4) [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.

dcts commented 3 years ago

This error occurs when instagram blocks you, can happen if you do too many requests in a short period of time (or if asynchronously fetch message for example). See the response code 429.

I faced this some time too, for me it usually worked when I wait 1 hour (without touching the bot) and it works again. Hope that helps