instagram-private-api
instagram-private-api copied to clipboard
IgNotFoundError: POST /api/friendship/destroy/ - 404 Not 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
- [ ] I'm using the latest version
- [ ] I've debugged my code using the
DEBUG
variable.
Platform
- [x] I'm using Node.js version
18.0.0
- [ ] I'm using electron
Description
We can't use unfollow action. An error occurred on ig.friendship.destroy method.
Code
js
async function Unfollow(msg) {
try {
var { followerId } = JSON.parse(msg);
await ig.friendship.destroy(followerId);
} catch (e) {
console.log({ e });
}
Error and Output
IgNotFoundError: POST /api/v1/friendships/destroy/{id}/ - 404 Not Found;
at Request.handleResponseError (/data/data/com.exemple/files/nodejs-project/node_modules/instagram-private-api/dist/core/request.js:103:20)
at Request.send (/data/data/com.exemple/files/nodejs-project/node_modules/instagram-private-api/dist/core/request.js:54:28)
at async FriendshipRepository.change (/data/data/com.exemple/files/nodejs-project/node_modules/instagram-private-api/dist/repositories/friendship.repository.js:46:26)
at async Unfollow (/data/data/com.exemple/files/nodejs-project/main.js:193:5)
at async EventChannel.<anonymous> (/data/data/com.exemple/files/nodejs-project/main.js:19:9)