Hello,
Sometimes I'm getting this issue on some accounts I have :
{ [RequestError: consent_required]
name: 'RequestError',
message: 'consent_required',
json:
{ message: 'consent_required',
consent_data:
{ headline: 'Updates to Our Terms and Data Policy',
content: 'We\'ve updated our Terms and made some changes to our Data Policy. Please take a moment to review these changes and let us know that you agree to them.\n\nYou need to finish reviewing this information before you can use Instagram.',
button_text: 'Review Now' },
status: 'fail' } }
I saw a solution in PHP that should be quick to add but don't really have enough knowledge of this lib to make a PR : https://github.com/mgp25/Instagram-API/issues/2327
Regards
The endpoint will be:
consent/existing_user_flow/
This is as and example. The flow from mine side is(you can adjust it to your needs):
const consent_required_flow_1 = (Client, session) => {
return new Client.Request(session)
.setMethod('POST')
.setResource('consent')
.setData({
_uid: session.profile.user_id,
_uuid: session.guid,
})
.signPayload()
.send()
}
const consent_required_flow_2 = (Client, session) => {
return new Client.Request(session)
.setMethod('POST')
.setResource('consent')
.setData({
current_screen_key: 'qp_intro',
_uid: session.profile.user_id,
_uuid: session.guid,
updates:JSON.stringify({"existing_user_intro_state":"2"})
})
.signPayload()
.send()
}
const consent_required_flow_3 = (Client, session) => {
return new Client.Request(session)
.setMethod('POST')
.setResource('consent')
.setData({
current_screen_key: 'tos_and_two_age_button',
_uid: session.profile.user_id,
_uuid: session.guid,
updates:JSON.stringify({"age_consent_state":"2","tos_data_policy_consent_state":"2"})
})
.signPayload()
.send()
}
return consent_required_flow_1(Client, session)
.then(() => {
return consent_required_flow_2(Client, session)
})
.then(() => {
return consent_required_flow_3(Client, session)
})
This feature is in the lib already. Took me a week to find out...
@Zhincore Where is it, in the lib? How did you use it?
@jordymeow There is a consent repository. All I do is this:
if(ig.consent.auto() === true){
// Continue
}else{
// Fail
}
It does all the work itself
Indeed, it does. Thanks a lot :)
Most helpful comment
The endpoint will be:
This is as and example. The flow from mine side is(you can adjust it to your needs):