ErrorxCode / EasyInsta

A Java library of Instagram's private API and wrapper of instagram4j. Surf Instagram programmatically, build bots, and a lot more. Just a line of code for every operation.
Apache License 2.0
46 stars 10 forks source link

How to deal with challenge required? #14

Closed spapapan closed 7 months ago

spapapan commented 1 year ago

I try to request the followers of a user like this:

    instagram.profile().getFollowers("user1")
            .setOnCompleteCallback(call ->
            {
                if (call.isSuccessful)
                {
                    List<String> followers = call.result;
                    for (String follower : followers)
                    {
                        Print.e(follower);
                    }
                }
            });

But I get the error challenge_required. How to deal with this error?

spapapan commented 1 year ago

It is worth noting that I got this error the second time I tried to make a request, so it's not that I spammed.

ErrorxCode commented 1 year ago

A big problem nowadays. Looks like instagram is improving their security algorithm day by day. They are somehow detection that we are using their API in unauthenticated way

To avoid these challenge, you can :-

I will update it as soon as I get the fix

noirtier-villefort commented 1 year ago

A big problem nowadays. Looks like instagram is improving their security algorithm day by day. They are somehow detection that we are using their API in unauthenticated way

To avoid these challenge, you can :-

* Use cache instead of logging everytime

* Add human interpreted gap between every request

* Do not use new accounts. accounts which are not older then 90 days suffer this problem the most. Instagram keep tracks of new account.

I will update it as soon as I get the fix

Maybe we can avoid it by updating APP_VERSION in instagram4j IGConstants and using new IGAndroidDevice`s ???

ErrorxCode commented 1 year ago

A big problem nowadays. Looks like instagram is improving their security algorithm day by day. They are somehow detection that we are using their API in unauthenticated way To avoid these challenge, you can :-

* Use cache instead of logging everytime

* Add human interpreted gap between every request

* Do not use new accounts. accounts which are not older then 90 days suffer this problem the most. Instagram keep tracks of new account.

I will update it as soon as I get the fix

Maybe we can avoid it by updating APP_VERSION in instagram4j IGConstants and using new IGAndroidDevice`s ???

Yeah, this is one of the crucial factor which is causing this problem. But instead of fixing that, we are again reverse engineering Instagram API with all the factors and constants taking in account. This one will be using Web API where as old instagran4j was using mobile version API. So instead of contributing to instagram4j, you can contribute in making of this new API