dilame / instagram-private-api

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

IgLoginRequiredError: POST /api/v1/direct_v2/threads/broadcast/text/ - 403 Forbidden; login_required #1680

Open Greensky-gs opened 1 year ago

Greensky-gs commented 1 year ago

Bug Report

I got a problem when the bot (on my account) needs to send a request to the API, I have an error. I worked fine yesterday, and today it doesn't work anymore and it returns the following error : IgLoginRequiredError: POST /api/v1/direct_v2/threads/broadcast/text/ - 403 Forbidden; login_required

It seems that it happens when I try to login with multiple devices on the same account, wich is quiet problematic, because I have to use it too to test the code

Form

Put an [x] if you meet the condition, else leave [ ].

Requirements

Description

The problem is basically described in the introduction, there's not much to say more, except that I removed the line n°359 of src/strucures/Client.js in insta.js, I don't really know if it'a related

Code

X

Error and Output

Here is the full error :

IgLoginRequiredError: POST /api/v1/direct_v2/threads/broadcast/text/ - 403 Forbidden; login_required
    at Request.handleResponseError (/root/insta/node_modules/instagram-private-api/dist/core/request.js:114:24)
    at Request.send (/root/insta/node_modules/instagram-private-api/dist/core/request.js:54:28)
    at async DirectThreadRepository.broadcast (/root/insta/node_modules/instagram-private-api/dist/repositories/direct-thread.repository.js:177:26)
    at async DirectThreadEntity.broadcast (/root/insta/node_modules/instagram-private-api/dist/entities/direct-thread.entity.js:193:26)
    at async DirectThreadEntity.broadcastText (/root/insta/node_modules/instagram-private-api/dist/entities/direct-thread.entity.js:27:16)
kingbotss commented 1 year ago

seems session expired. or your logic is wrong.

Greensky-gs commented 1 year ago

I don't know because it worked, then it don't worked and worked again