6

Is there a way to add 2FA to Facebook's Oauth2 flow? The following error is returned when trying to hit the graph API's insights endpoint for a user that has 2FA enabled on their FB Business Manager account:

"error": {
    "fbtrace_id": "HrY8K9KfT4U",
    "error_user_msg": "Unknown 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.",
    "error_subcode": 1404120,
    "type": "OAuthException",
    "error_user_title": "Ask user to pass two factor authentication",
    "is_transient": false,
    "code": 415
  }
Nick McCoy
  • 61
  • 3

1 Answers1

2

I've seen this issue a couple of times and the problem usually extends from the Business Manager having two-factor authentication enabled, but the user making the API calls does not have two-factor authentication enabled on their account.

In all the cases I've seen, having the user enable two-factor authentication on their account, and pass through the 2-fac login flow has fixed the issue for the user.

Devesh mehta
  • 1,505
  • 8
  • 22
  • 1
    This also fits the description [here](https://support.supermetrics.com/support/solutions/articles/19000092170-facebook-error-two-factor-authentication-required) and [here](https://developers.facebook.com/community/threads/283740139183057/). – Nick Russler Jan 31 '20 at 14:01