pgrimaud / instagram-user-feed

This is a scrapper to easily fetch any feed and interact with Instagram (like, follow, etc.) without OAuth for PHP.
MIT License
882 stars 138 forks source link

Generic error \/ Your IP may be block from Instagram. You should consider using a proxy #307

Closed bugbaal closed 2 years ago

bugbaal commented 2 years ago

Version(s) affected: 6.15

Description
If I use or not the client proxy I get always the same message in the title description

How to reproduce
Just the same of the example: $client = new Client([ 'proxy' => [ 'https' => 'xxx.xxx.12.138:999' ] ]);

$data   = $client->request('GET', 'https://api.ipify.org?format=json');
^------ here I saw the proxy IP

$dataRealIp = json_decode(file_get_contents('https://api.ipify.org?format=json'));
^------ here I saw my real IP

$api = new Api($cachePool, $client);
$api->login($credentials->getLogin(), $credentials->getPassword());

but I get the exception: "Generic error \/ Your IP may be block from Instagram. You should consider using a proxy."

What could be the problem? Thanks

sportakal commented 2 years ago

+1

pgrimaud commented 2 years ago

How many requests did you make on 24h? Is the proxy shared between multiple users?

bugbaal commented 2 years ago

How many requests did you make on 24h? Is the proxy shared between multiple users?

The real IP was already banned. So, I take a new proxy to try a new connection. The problem is that if I use a 'http' proxy the client don't use the proxy, but it continues to use the real IP. It only works if I use an 'https' certificate proxy.

pgrimaud commented 2 years ago

The problem is that if I use a 'http' proxy the client don't use the proxy, but it continues to use the real IP. It only works if I use an 'https' certificate proxy.

Good to know, thank you for the information.

nam-co commented 2 years ago

I was having the same problem and I came up with this, install openVPN or WireGuard to make your server work as a vpn, connect to the vpn from your computer and login to instagram using your browser, you verify/accept the new location, sounds complicated but actually it was very easy, after this I got it working 🤞 remember to delete the cache folder