Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Solving challenge required in instagram private api

I am trying to solve challenges required from Instagram when I log in to my account, I am using mgp25 Instagram API library (V 4.1.0 stable)

I was able to sniff the necessary request in order to solve the challenge, But I am having problems when I add them to the library

I wrote this function to request the code to my email or phone

// Challenge url on this format /challenge/1463452997/1zS1L8kl62/
public function sendChallenge($challenge_url)
{
    return $this->request($challenge_url)
        ->addParam('choice', 1)
        ->addPost('device_id', $this->device_id)
        ->addPost('guid', $this->uuid)
        ->addPost('_csrftoken', $this->client->getToken())
        ->getResponse(new Response\UserInfoResponse());
}

My problem is whenever I request this function no matter where I put it, I always get

"User not logged in. Please call login() and then try again."

so how can I use this function after a failed login ( necessary to retrieve the challenge url) without getting User not logged in exception

like image 713
martin bayen Avatar asked Oct 25 '25 21:10

martin bayen


1 Answers

This worked for me:

Steps:

  1. Have google chrome or install google chrome cause its what I did it on
  2. Go to instagram.com and in your address bar it should now show www.instagram.com/challenge/ or something similar.
  3. This is were you will delete cookies from this site to stop them from replaying the same error message over and over... even if you have the right sms code. Go to step 4!
  4. Click green lock button(website security verification) in your address bar (top left on screen) and go to site settings.
  5. Once there click the back button in the setting option NOT the actual back button to take you to your previous webpage but the little arrow button to go back in the setting.
  6. Then click cookies option
  7. Then click "see all cookies and site data"
  8. "Search cookie" should show in the search bar in the top right
  9. Search Instagram and all your cookies come up
  10. Delete ALL cookies and go back to instagram.com
  11. Finished and should let you log in hopefully.
like image 119
user10377772 Avatar answered Oct 27 '25 12:10

user10377772



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!