Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Max Besties Exceeded Error While Adding Followers to Close Friends List #1800

Open
hamza08003 opened this issue Oct 10, 2024 · 9 comments
Open
Labels
bug unconfirmed This issue hasn't been read/confirmed/accepted by an admin

Comments

@hamza08003
Copy link

hamza08003 commented Oct 10, 2024

Max besties exceeded Error While Adding Followers to Close Friends List

Description

While adding followers to the close friends list, I encountered a 400 Bad Request error with the message "max besties exceeded" after adding 9,999 followers. There were no issues during the process of adding followers in batches up to this point, but once the close friends list reached 9,999 users, the error consistently appeared. The error occurred after attempting to add more followers using the setBesties endpoint.

The error encountered:

Retry failed: IgResponseError: POST /api/v1/friendships/set_besties/ - 400 Bad Request; max besties exceeded
    at Request.handleResponseError (C:\Users\hamza\Desktop\instagram-close-friends-automation-ts\node_modules\instagram-private-api\src\core\request.ts:172:12)
    at Request.send (C:\Users\hamza\Desktop\instagram-close-friends-automation-ts\node_modules\instagram-private-api\src\core\request.ts:83:24)
    at async FriendshipRepository.setBesties (C:\Users\hamza\Desktop\instagram-close-friends-automation-ts\node_modules\instagram-private-api\src\repositories\friendship.repository.ts:76:22)

image

Relevant code section:

await ig.friendship.setBesties({ add: batch, remove: [] });
// Function to add followers to the close friends list
async function addToCloseFriends(ig: IgApiClient, followerIds: string[], batchSize: number, requestDelay: number, batchDelay: number) {
    let totalAdded = 0;
    console.log(`Adding ${followerIds.length} followers to close friends list...`);
    for (let i = 0; i < followerIds.length; i += batchSize) {
        const batch = followerIds.slice(i, i + batchSize);
        try {
            await ig.friendship.setBesties({ add: batch, remove: [] });
            totalAdded += batch.length;
            console.log(`Added batch ${Math.floor(i / batchSize) + 1} to close friends. Total added: ${totalAdded}`);
            await new Promise(resolve => setTimeout(resolve, requestDelay))
        } catch (error) {
            if (error instanceof IgNotFoundError) {
                console.error('An API endpoint was not found:', error.message);
            } else {
                console.error('An error occurred while adding to close friends:', error);
            }
            break;
        }
    
        await new Promise(resolve => setTimeout(resolve, batchDelay));
    }
    console.log('All followers have been added to the close friends list.');

Key Details

  • No issues occurred while adding followers up to 9,999.
  • The error consistently appears when attempting to exceed the 9,999 follower limit.
@hamza08003 hamza08003 added bug unconfirmed This issue hasn't been read/confirmed/accepted by an admin labels Oct 10, 2024
@keroo43o423
Copy link

any updates on this? im also limited

@hamza08003
Copy link
Author

any updates on this? im also limited

Unfortunately, I haven't found a workaround yet, but I'm still looking into possible solutions. If you come across any idea or updates on this, the do share!

@keroo43o423
Copy link

i think we should sniff traffic on mobile app (when in close friends section) to learn the new endpoint and request.

@keroo43o423
Copy link

i know there are people who can add more than 1m followers to close friends.
you can't add more than 10k close friends when mimicking a desktop device using this endpoint: https://i.instagram.com/api/v1/friendships/set_besties/

@keroo43o423
Copy link

you're getting this error: max besties exceeded , right

@hamza08003
Copy link
Author

i think we should sniff traffic on mobile app (when in close friends section) to learn the new endpoint and request.

Yes I'm getting the problem Ater 9999 followers, I also know people who added around 50k+ followers to the close friends list.

And I saw on one forum, someone was saying that on desktop, the close friends list starts glitching after 9999 followers so you can't add more.

So Sniffing traffic on the mobile app sounds like a good idea to explore any different endpoints or requests.

@sunmasters
Copy link

I am able to do without problems. You are using old API, that has limit.

@hamza08003
Copy link
Author

I am able to do without problems. You are using old API, that has limit.

Could you share how you managed to do it without any issues? Which API did you use ?

@sunmasters
Copy link

It is hidden API. Can't share
jumpshare. com/s/Ltn8lXtMoIX0daNrmVAC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug unconfirmed This issue hasn't been read/confirmed/accepted by an admin
Projects
None yet
Development

No branches or pull requests

3 participants