facebook / facebook-python-business-sdk

Python SDK for Meta Marketing APIs
https://developers.facebook.com/docs/business-sdk
Other
1.29k stars 635 forks source link

Ad Insights retrieval not working when using account with 2FA #516

Closed nick-mccoy closed 6 years ago

nick-mccoy commented 6 years ago

Hello, I am getting an error when I try to retrieve insights for an account with 2FA (Two Factor Authentication) enabled:

{
  "error": {
    "message": "Two factor authentication required. User have to enter a code from SMS or TOTP code generator to pass 2fac. This could happen when accessing a 2fac-protected asset like a page that is owned by a 2fac-protected business manager.",
    "type": "OAuthException",
    "code": 415,
    "error_subcode": 1404120,
    "is_transient": false,
    "error_user_title": "Ask user to pass two factor authentication",
    "error_user_msg": "Unknown error",
    "fbtrace_id": "H8vqfjKyx+K"
  }
}

I tried re-authing and getting a new access token, and still had the same problem. I've also created a bug on facebook's platform, but figured I'd create an issue here as well in case anyone is having the same problem or knows of a solution.

jingping2015 commented 6 years ago

Hey, thanks for your comment! This is actually an api issue. Please report the issue on Devsite Bug Report channel: https://developers.facebook.com/support/bugs/ Thanks!

nick-mccoy commented 6 years ago

See the link in my post :)