You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
//basically doing this would give the errorig.friendship.create(58215877889)//or thisasyncfunctionfollowLikers(mediaId){constlikersFeed=awaitig.media.likers(mediaId);for(leti=0;i<likersFeed.users.length&&i<10000;i++){constliker=likersFeed.users[i];try{awaitig.friendship.create(liker.pk);console.log(`Followed user: ${liker.username}`);}catch(err){console.error(`Error following user ${liker.username}:`,err);}awaitnewPromise(resolve=>setTimeout(resolve,1000));}console.log('Finished following likers.');}
Error and Output
Error followinguserfabo.2029: IgNotFoundError: POST/api/v1/friendships/create/58215877889/-404NotFound;atRequest.handleResponseError(c:\Users\e\Documents\NodeJS\InstagramAPI\node_modules\instagram-private-api\dist\core\request.js:103:20)atRequest.send(c:\Users\e\Documents\NodeJS\InstagramAPI\node_modules\instagram-private-api\dist\core\request.js:54:28)atasyncFriendshipRepository.change(c:\Users\e\Documents\NodeJS\InstagramAPI\node_modules\instagram-private-api\dist\repositories\friendship.repository.js:59:26)atasyncfollowLikers(c:\Users\e\Documents\NodeJS\InstagramAPI\index.js:71:7)atasync C:\Users\e\Documents\NodeJS\InstagramAPI\index.js:30:3{stack: 'IgNotFoundError: POST /api/v1/friendships/cre…cuments\\NodeJS\\Instagram API\\index.js:30:3',message: 'POST /api/v1/friendships/create/58215877889/ - 404 Not Found; ',name: 'IgNotFoundError',response: IncomingMessage}
IgNotFoundError: POST /api/v1/friendships/create/58215877889/ - 404 Not Found;
at eval (eval-2cf44ba1.repl:1:7)
at followLikers (C:\\Users\\e\\Documents\\NodeJS\\Instagram API\\index.js:74:7)
at async C:\\Users\\e\\Documents\\NodeJS\\Instagram API\\index.js:30:3
The text was updated successfully, but these errors were encountered:
Bug Report
Form
Requirements
DEBUG
variable.Platform
v16.16.0
Description
Getting an error when trying to follow a user,
ig.friendship.create
doesn't seem to workCode
Error and Output
The text was updated successfully, but these errors were encountered: