Open vapefy opened 2 years ago
@vapefy I didn't implement it, but you can help me to do it yourself and send a PR
@adw0rd okay, i will do what i can.
@vapefy , hi did you have a chance to solve it?
If nobody is working on this issue, I'd be happy to help! I'll see what I can do to implement this. Edit (03-07-2023): Haven't gotten around to work on this issue yet, feel free to pick it up!
I found a different approach, for a couple seconds set account to public then back private. It auto approves all pendings..
If nobody is working on this issue, I'd be happy to help! I'll see what I can do to implement this.
Did you continue to implement this? I am trying to filter the followers I want to accept, so auto approve all is not good enough
@oneYAD No, I have been putting work in other projects lately. Feel free to pick it up if you want! I will update my comment to avoid confusion.
@oneYAD No, I have been putting work in other projects lately. Feel free to pick it up if you want! I will update my comment to avoid confusion.
Do you have a lead?
@oneYAD No, I haven't. But I'd be happy to help if you have questions about the development!
@oneYAD If you don't know / want / etc. to contribute to the instagrapi directly, I would make something that firstly gets all the current followers of your account. Save those followers somewhere (.txt, .json, etc.) . Then manually accept all the follow requests, and loop over all the new followers, then check each new follower if it matches your requirements and based on that unfollow / keep following the user
@oneYAD If you don't know / want / etc. to contribute to the instagrapi directly, I would make something that firstly gets all the current followers of your account. Save those followers somewhere (.txt, .json, etc.) . Then manually accept all the follow requests, and loop over all the new followers, then check each new follower if it matches your requirements and based on that unfollow / keep following the user
I am fine with contribute if the solution will be fit, but I don't see one right now. your solution is little tricky and I trying to think about more 'smooth' option
@oneYAD I'll try to help you find a lead right now, I have a bit of time this evening.
I've stumbled on this: https://github.com/sem/Instagram-Request-Scanner https://stackoverflow.com/questions/55706145/how-to-get-the-exact-number-of-follow-requests-on-an-instagram-account-after-re
It seems like it's possible to retrieve the incoming follow requests with the
https://i.instagram.com/api/v1/news/inbox/friendships/pending/
endpoint.
I don't know if this endpoint is still active at the moment, but it seems likely.
I've stumbled on this: https://github.com/sem/Instagram-Request-Scanner https://stackoverflow.com/questions/55706145/how-to-get-the-exact-number-of-follow-requests-on-an-instagram-account-after-re
It seems like it's possible to retrieve the incoming follow requests with the
https://i.instagram.com/api/v1/news/inbox/friendships/pending/
endpoint.I don't know if this endpoint is still active at the moment, but it seems likely.
Yes, I find it also here - https://github.com/michaeltikhonovsky/instagram_accepter_bot. tnx
Add this code to instagrapi
def get_pending_users(self):

result = self.private_request("friendships/pending?")
return result["users"]
def approve_user(self, pk_id):

body = {
 "_uid": self.user_id,
 "_uuid": self.uuid,
 "_csrftoken": self.token,
 "user_id": pk_id
 }

result = self.private_request(f"friendships/approve/{pk_id}/", data=json.dumps(body), with_signature=True)

return result
Are there any methods to see and accept the follow requests when the account is private?