2-factor error occurs while it's enabled for the user

69 views
Skip to first unread message

Tiana S.

unread,
Mar 22, 2023, 9:26:29 AM3/22/23
to Google Ads API and AdWords API Forum
Hi there,

I have a customer that's getting a 2-factor authentication requirement error, but they confirmed they have already enabled 2-factor authentication.

Full error:

"TWO_STEP_VERIFICATION_NOT_ENROLLED"},"message":"An account administrator changed this account's authentication settings. To access this Google Ads account, enable 2-Step Verification in your Google account at https://www.google.com/landing/2step."


Are there any other cases this error can occur or what the customer can try to fix the issue?

Can provide more details privately of course.

Thanks in advance,

Tiana

Google Ads API Forum Advisor

unread,
Mar 22, 2023, 4:09:08 PM3/22/23
to adwor...@googlegroups.com

Hi Tiana,

Thank you for reaching out to the Google Ads API Support.

The TWO_STEP_VERIFICATION_NOT_ENROLLED error occurs when the user authenticating the API call does not belong to an account that is set up for 2-Step Verification. With this, please ensure that the email you are authenticated as has been added as a user on the Google Ads account that you are targeting.

Kindly note that the account administrators can require all users of a Google Ads account to enable 2-Step Verification to access the Google Ads account. This appears to be happening as mentioned in this document.

If the user enabled 2-step verification, then during the OAuth2 authentication flow, Google prompts the user for 2-step verification before issuing a refresh token. Once issued, the refresh token can be used to issue access tokens. However, the API calls made using this access token will fail with an AuthenticationError.TWO_STEP_VERIFICATION_NOT_ENROLLED in the Google Ads API until the user enables 2-step verification in their Google account. 

Let us know if you have further questions.
 

Regards,

Google Logo Google Ads API Team


ref:_00D1U1174p._5004Q2k1oQ3:ref
Reply all
Reply to author
Forward
0 new messages