I am trying to generate an access token for admin user system with id 100034358611019. Instead of returning the access token I get an error response related with 2FA:
{
"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_data": {
"hash": "8874359819718335175"
},
"error_subcode": 2859009,
"is_transient": false,
"error_user_title": "Two-factor authentication required",
"error_user_msg": "To continue working in your account, please refresh this page to authenticate. Or navigate to the business settings page and authenticate when prompted.",
"fbtrace_id": "AwfkZm6RouSgmnWYNFln2q1"
}
}
Meanwhile my user has enabled the 2FA.
Steps/Sample code to reproduce the issue
new User.APIRequestCreateAccessToken("100034358611019", FacebookUtil.createApiContext(request.getAccessToken())).setBusinessApp("2990249911190581").setScope("business_management").execute();
Which SDK version are you using?
What's the issue?
I am trying to generate an access token for admin user system with id 100034358611019. Instead of returning the access token I get an error response related with 2FA:
{ "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_data": { "hash": "8874359819718335175" }, "error_subcode": 2859009, "is_transient": false, "error_user_title": "Two-factor authentication required", "error_user_msg": "To continue working in your account, please refresh this page to authenticate. Or navigate to the business settings page and authenticate when prompted.", "fbtrace_id": "AwfkZm6RouSgmnWYNFln2q1" } }
Meanwhile my user has enabled the 2FA.
Steps/Sample code to reproduce the issue
Expected Results: