Closed camohub closed 3 years ago
The same thing is happening to me:
$cachePool = new FilesystemAdapter ( 'Instagram' , 0 , __DIR__. '/../caché' );
$api = new Api ( $cachePool );
$api -> login ( 'user' , 'pass' ); // obligatorio
$perfil = $api -> getProfile ( 'user' );
$perfil -> getUserName ();
dd($perfil);
Unknown error, please report it with a GitHub issue. Client error:
POST https://www.instagram.com/accounts/login/ajax/resulted in a
403 Forbiddenresponse: {"message": "Please wait a few minutes before you try again.", "status": "fail"}
@xbfast i also had similar problem this happens when you exceed login limit just try after some time it will work.
Hello, I tried again today and the same thing keeps happening to me @PrasadBroo
make new account and try with it
Hello there
Localy it works perfectly well. But on production server it throws an error.
the same issue for me, first I got
Unknown error, please report it with a GitHub issue. Client error: POST https://www.instagram.com/accounts/login/ajax/resulted in a 403 Forbidden response: {"message": "Please wait a few minutes before you try again.", "status": "fail"}
then after clearing cache I got Unknown error, please report it with a GitHub issue. Client error: POST https://www.instagram.com/accounts/login/ajax/ resulted in a 429 - response: {"message": "", "spam": true, "status": "fail"}
<!DOCTYPE html>
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Below is the request that send to pass this page, I copied it from my browser.
{challengeType: "AcknowledgeForm", errors: [], experiments: {},…} challengeType: "AcknowledgeForm" challenge_context: "{"step_name": "", "nonce_code": "IY71kqdBo6", "user_id": 44278780500, "is_stateless": false}" errors: [] experiments: {} extraData: {typename: "GraphChallengePage",…} content: [{typename: "GraphChallengePageHeader", description: null,…},…] 0: {typename: "GraphChallengePageHeader", description: null,…} description: null title: "Your Account Has Been Temporarily Locked" typename: "GraphChallengePageHeader" 1: {typename: "GraphChallengePageText", alignment: "center", html: null,…} alignment: "center" html: null text: "We've detected suspicious activity on your Instagram account and have temporarily locked it as a security precaution." typename: "GraphChallengePageText" 2: {typename: "GraphChallengePageText", alignment: "center", html: null,…} alignment: "center" html: null text: "It's likely that your account was compromised as a result of entering your password on a website designed to look like Instagram. This attack is known as phishing." typename: "GraphChallengePageText" 3: {typename: "GraphChallengePageText", alignment: "center", html: null,…} alignment: "center" html: null text: "Over the next few steps we'll ask you to verify your identity to help secure your account, and let you log back in." typename: "GraphChallengePageText" 4: {typename: "GraphChallengePageForm", call_to_action: "Continue", display: "inline", fields: null,…} call_to_action: "Continue" display: "inline" fields: null href: null typename: "GraphChallengePageForm" __typename: "GraphChallengePage" fields: {} navigation: {forward: "/challenge/44278780500/IY71kqdBo6/", replay: "/challenge/replay/44278780500/IY71kqdBo6/",…} dismiss: "https://www.instagram.com/" forward: "/challenge/44278780500/IY71kqdBo6/" replay: "/challenge/replay/44278780500/IY71kqdBo6/" privacyPolicyUrl: "/about/legal/privacy/" status: "ok" type: "CHALLENGE"
What it means?
Any solution for that?
First of all, everyone should understand that logging into your Instagram account is currently not neccessary to parse public account feeds if you use good clean ip, and parsing public accounts is one of the most common tasks of scrapers. Easiest way to test if the Instagram page you need is accessible to anonymous is to use Chrome Incognito and just open the url in browser, e.g.: https://www.instagram.com/affordablewristtime/ is available for anonymous when you open it via your home network.
Then try to open the same page via curl from your server (use "Copy as CURL" functionality in Chrome inspector and make sure user agent is set in headers). Review if the response from instagram differs (e.g. check
Big chance is that your datacenter ip is banned by Instagram and it will just show your "please log in". Instagram is very strict in terms of ip ranges. They've banned all big datacenter up ranges long time ago, and they ban residential proxy ips every day.
1) If you have low volume you should just stick to your home residential network and you should NOT log in into your Instagram account to avoid account locking, unless you really need to work with private information which is not available to anonymous users. 2) Another way is to use residential and mobile proxies to access the same public accounts. If you have to log in to your account, be really careful on changing proxies, try to stick to single ip address. Residential proxies will still fail so you need to implement retry logic and validate responses. 3) Another good option, if you need to scrape public accounts, is to use https://github.com/restyler/instagram-php-scraper which handles residential proxies switching and retries for you.
Hmm, it seems also the public accounts are behind the login barier https://thenextweb.com/socialmedia/2019/10/28/instagram-now-forces-people-to-sign-in-to-view-public-profiles/
Hmm, it seems also the public accounts are behind the login barier https://thenextweb.com/socialmedia/2019/10/28/instagram-now-forces-people-to-sign-in-to-view-public-profiles/
https://rapidapi.com/restyler/api/instagram40?endpoint=apiendpoint_792b5e11-15ea-4c16-ac77-96c4abca64a3 you can test public account access here , enter url of public account to the api param "URL" and click "test" button to get the result.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Version(s) affected: 6
Description
development.ERROR: Unknown error, please report it with a GitHub issue. Client error:
POST https://www.instagram.com/accounts/login/ajax/
resulted in a429 -
response: {"message": "", "spam": true, "status": "fail"} {"exception":"[object] (Instagram\Exception\InstagramAuthException(code: 0): Unknown error, please report it with a GitHub issue. Client error:POST https://www.instagram.com/accounts/login/ajax/
resulted in a429 -
response: {\"message\": \"\", \"spam\": true, \"status\": \"fail\"} at /data/d/2/d256db6b-f1df-4272-beb5-c33bfe9038b4/amando.sk/sub/new/vendor/pgrimaud/instagram-user-feed/src/Instagram/Auth/Login.php:97) [stacktrace]0 /data/d/2/d256db6b-f1df-4272-beb5-c33bfe9038b4/amando.sk/sub/new/vendor/pgrimaud/instagram-user-feed/src/Instagram/Api.php(97): Instagram\Auth\Login->process()
1 /data/d/2/d256db6b-f1df-4272-beb5-c33bfe9038b4/amando.sk/sub/new/app/Models/Services/InstagramService.php(71): Instagram\Api->login('info@kaufmann.s...', 'xxxxxxxxx')
2 /data/d/2/d256db6b-f1df-4272-beb5-c33bfe9038b4/amando.sk/sub/new/app/Models/Services/InstagramService.php(40): App\Models\Services\InstagramService->getApi()
How to reproduce
Weird is I am able to log in from localhost but not from the production server. I seems it could be related to rate limi. I made it make request every 0.1 second.
But I am not sure. Is it possible to get more than 12 medias at once?