You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Got Response code is 403: Forbidden.Something went wrong. Please report issue. at this line $instagram->login();
here's my code $username = ''; $password = ''; $instagram = \InstagramScraper\Instagram::withCredentials(new \GuzzleHttp\Client(), $username, $password, new Psr16Adapter('Files')); // dd($instagram); $instagram->login(); // will use cached session if you want to force login $instagram->login(true) $instagram->saveSession(); //DO NOT forget this in order to save the session, otherwise have no sense $account = $instagram->getAccountById(3); echo $account->getUsername();
here's my response for dd($instagram);
The text was updated successfully, but these errors were encountered:
If you are on last version 0.12.9 and after debug you get error in line 2242 from src/InstagramScraper/Instagram.php
then you may fix the issue with this changes
Change preg_match('/\\\\"csrf_token\\\\":\\\\"(.*?)\\\\"/', $response->body, $match);
To: preg_match('/csrftoken=(.*?);/', $response->headers['Set-Cookie'][0], $match);
Or see diff from attached file (could be used as patch if replace the extension to .patch): login.txt
Got Response code is 403: Forbidden.Something went wrong. Please report issue. at this line
$instagram->login();
here's my code
$username = ''; $password = ''; $instagram = \InstagramScraper\Instagram::withCredentials(new \GuzzleHttp\Client(), $username, $password, new Psr16Adapter('Files')); // dd($instagram); $instagram->login(); // will use cached session if you want to force login $instagram->login(true) $instagram->saveSession(); //DO NOT forget this in order to save the session, otherwise have no sense $account = $instagram->getAccountById(3); echo $account->getUsername();
here's my response for
dd($instagram);
The text was updated successfully, but these errors were encountered: