instagram-private-api
instagram-private-api copied to clipboard
IgResponseError: POST /api/v1/qe/sync/ - 302 Found
Bug Report
Read the Notes and fill out the form.
Notes
Your issue will be closed if you violate any rule below.
- You need to include a meaningful section of your code (not your entire project and not a single line).
- Please do not add screenshots as they're not easy to work with.
- Errors like
IgActionSpamError (feedback_required)
,IgCheckpointError (challenge_required)
,checkpont_required
,login_required
are "common" and there are multiple issues, search here. - You can delete this section after reading it.
Form
Put an [x]
if you meet the condition, else leave [ ]
.
Requirements
- [x] I've searched the Issues
- [x] I've read the basic concepts
- [x] I'm using the latest version
- [ ] I've debugged my code using the
DEBUG
variable.
Platform
- [x] I'm using Node.js version
12.18.2
- [ ] I'm using electron
- [ ] I'm using the browser
YOUR_BROWSER_AND_VERSION
- [ ] I'm using some other environment
YOUR_ENV
Description
I am trying to login with a username and password. It works in the past. But after I pm2 restart once and it continue to show this error when I try to log in.
YOUR DESCRIPTION HERE
Code
Add a meaningful section of your code here. If you are using TypeScript replace js
with typescript
.
async function login(username, password) {
console.log(username);
console.log(password);
try {
const id = uuidv4();
console.log(typeof id);
await ig.state.generateDevice('uuidv4');
await ig.simulate.preLoginFlow();
const loggedInUser = await ig.account.login(username, password);
await ig.simulate.postLoginFlow();
// console.log('loggedInUser:');
return loggedInUser;
} catch (err) {
// console.log('error');
console.log(err);
throw err;
}
}
Error and Output
If you've got an error put it here.
You can get the stacktrace in the most environments using
Error.stack
(MDN Docs).
IgResponseError: POST /api/v1/qe/sync/ - 302 Found;
at Request.handleResponseError (/root/ig-dm/node_modules/instagram-private-api/dist/core/request.js:125:16)
at Request.send (/root/ig-dm/node_modules/instagram-private-api/dist/core/request.js:53:28)
at async QeRepository.sync (/root/ig-dm/node_modules/instagram-private-api/dist/repositories/qe.repository.js:28:26)
at async AccountRepository.login (/root/ig-dm/node_modules/instagram-private-api/dist/repositories/account.repository.js:13:13)
at async login (/root/ig-dm/routes/users.js:168:26)
I am having the same problem, I assume its a rate limit issue. Did you ever find a solution?
I am also having same intermittently while running the script for aws instance.
I am having the same problem, I assume its a rate limit issue. Did you ever find a solution?
No, I did not find the solution. I just deploy the application to other machine. Initially It was deployed on a vultr VPS, now is a AWS instance
i have the same issue, is there a solution?
I have the same issue. Everything works fine locally though.
i have same issue
Same issue, local server works but fails upon AWS EC2 instance. Any resolution for this?
same here
Issue appears to be across all hosting providers
Has this problem already been resolved?
Any updates?
You can't use a script on a VPS. Instagram is blocking it. Workaround: use ig.state.serialize to dump the credentials et al. on your local machine and then load it on the VPS using ig.state.deserialize. Only the login procedures are blocked by Instagram.