cURL error 6: Could not resolve host. Mgp25/InstagramAPI

1.2k Views Asked by At

I'm using Instagram API by mgp25. When my network settings change (connect to different Wifi network) login function throws cURL error 6. I guess, It's because of sessions and cookies stored during previous sessions but I'm not so sure. I tried to find something on how to reset these sessions or cookies but I was not able to. Any help on how I can achieve that?

3

There are 3 best solutions below

0
On

I solved this problem by removing proxies.

2
On

The error message you receive has nothing to do with cookies or session except if you are not taking URL where your request goes from the session or cookies. I highly doubt that.

The error you receive is an indication of a network problem and unreachable host.

  1. So I advise you check your network, turn off/on VPNs.
  2. check if the URL where you are sending your request is correct 100%!

All should be fine if you are sure all network and URLs are correct.

0
On

I think the problem is with IG spam system, they start blocking you or challenging your users. When you sign up with one IP but later switch to another IP their system will lock your requests for security and send your request challenge_request. Cookies should be fine, as they do not depend on your IP. Create your users on a server that does not change its IP and you can use them for long time.