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