mgp 25 “Consent required”

生来就可爱ヽ(ⅴ<●) 提交于 2020-06-01 05:30:34

问题


I am getting an error in the mgp25 Instagram API. When I run the application on localhost, there is no problem, but when I get to the paid host, I get the following error.:

InstagramAPI\Response\TimelineFeedResponse: Consent required 

I had been working trouble free for 1-2 days but I noticed that it is not working. How can I solve this problem, is the problem with the proxy?


回答1:


This exception is related to GDPR consent. Is your host IP from the EU?

A GPDR consent request would look like this one:

public function sample()
{
    return $this->ig->request('consent/existing_user_flow/')
        ->addPost('_uuid', $this->ig->uuid)
        ->addPost('_uid', $this->ig->account_id)
        ->addPost('_csrftoken', $this->ig->client->getToken())
        ->addPost('current_screen_key', 'tos_and_two_age_button')
        ->addPost('updates', json_encode(['age_consent_state' => 2, 'tos_data_policy_consent_state' => 2]))
        ->getResponse(new Response\GenericResponse());
}

You can get more info here: https://github.com/mgp25/Instagram-API/pull/2047



来源:https://stackoverflow.com/questions/53203267/mgp-25-consent-required

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!