instagram-php-scraper
instagram-php-scraper copied to clipboard
Response code is 401: Unauthorized.Something went wrong. Please report issue.
Working fine on localhost but on Production level it return an error Response code is 401: Unauthorized.Something went wrong. Please report issue.
Code Snippet: $instagram->getAccountInfo('username');
The same issue please someone help with this issue. Or please share more info about using a proxy server. my proxy server is also throwing the same error.
@IrfanPatelDev use this code to fetch public userdata by username
$instagram = new \InstagramScraper\Instagram(new \GuzzleHttp\Client()); $nonPrivateAccountMedias = $instagram->getMedias('kevin'); echo $nonPrivateAccountMedias[0]->getLink();
kindly check example folder and i hope you will never use proxy server https://github.com/postaddictme/instagram-php-scraper/tree/master/examples
@IrfanPatelDev use this code to fetch public userdata by username
$instagram = new \InstagramScraper\Instagram(new \GuzzleHttp\Client()); $nonPrivateAccountMedias = $instagram->getMedias('kevin'); echo $nonPrivateAccountMedias[0]->getLink();
kindly check example folder and i hope you will never use proxy server https://github.com/postaddictme/instagram-php-scraper/tree/master/examples Thanks @Arish68 for your reply, I tried this but still no luck :(
I have same problem. On localhost works but on production server i haven't authorization. I'm using proxy.
All these problems are related to the proxy, that is why it works on your local connection because you are using your telecom connection which is a residential connection.
You may buy a proxy but it is very expansive, each 1 GB of traffic = 25 UDS. if any one is interested in this type of proxy you can contact me.
Regards
im using proxy, using this library one year, in last 10 days, only getmedias showing error 401. I change the proxy to rotating, not sticky and all is ok now
@brucekasinsky please explain your solution (proxy to rotating)
@Arish68
First you have to get a good proxy, for me the only one i get working with facebook is smartproxy, residencial plan. I test like five and have the problem with 401 error. There are option to use sticky and rotating.
The main difference between sticky and rotating proxies is that a sticky proxy associates a single IP address per user request while a rotating proxy assigns various IP addresses for each new request.
Same here... same using this rotating proxy
Everything was working, and then I keep getting 401 Unauthorized. Is it some kind of ban by Instagram? How this can be fixed?
Use a proxy service. Instagram bans IPS if it defects unusual activity from them.
On Sun, 19 Feb 2023, 18:28 MJRamon, @.***> wrote:
Everything was working, and then I keep getting 401 Unauthorized. Is it some kind of ban by Instagram? How this can be fixed?
— Reply to this email directly, view it on GitHub https://github.com/postaddictme/instagram-php-scraper/issues/1104#issuecomment-1436059575, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAXC3UDK2BKU643IWPAN7VDWYJQ3JANCNFSM6AAAAAAR4QWNJ4 . You are receiving this because you are subscribed to this thread.Message ID: @.***>
I am now using https://rapidapi.com/neotank/api/instagram130/ and they somehow manage to download account json info (I am using /account-info endpoint of this api and it returns basic account info and 12 latest posts in JSON) - and they do not require to supply any cookies or login info - but this is a paid API.. it's still cheaper than purchase very expensive proxies per GB tho