Two Step Authentication error from gapi SDK

110 views
Skip to first unread message

access access

unread,
May 27, 2019, 2:25:45 AM5/27/19
to AdWords API and Google Ads API Forum
Hello!

Just recently we've been receiving errors in our app from the google api for two step authentication:
AuthorizationError.TWO_STEP_VERIFICATION_NOT_ENROLLED
From my understanding the MCC account has to have two step verification in order to access it's accounts. 
https://ads-developers.googleblog.com/2018/08/multi-factor-authentication-policy-for.html

Both the ads MCC and the account do not have two step enabled and prior to this message ( a day or two ago ) and was not an issue and created no errors. 
I was wondering what could have changed in order to get this error and how one would resolve / provide a good user experience to the authenticated user other then throwing them an error. 

Thanks!


Google Ads API Forum Advisor Prod

unread,
May 27, 2019, 6:35:33 AM5/27/19
to adwor...@googlegroups.com
Hi, 

The error AuthorizationError.TWO_STEP_VERIFICATION_NOT_ENROLLED occurs when the account is on two step authentication but the refresh token being used does not belong to an email which is setup for 2-Step authentication. Are you added as a user on the Google Ads account or are your API calls authorized by a user who has access to the target account?

If it is the second case, that user who authorized the API call and generated the authorization code should also have their Google accounts enrolled in 2-Step Verification. If you are directly a user on the account, and have already enrolled for 2-Step verification, can you confirm the Google Ads email account which you are making the API call? You may use the reply privately to author option.

Regards,
Dannison
Google Ads API Team

ref:_00D1U1174p._5001UAqiy0:ref

cv

unread,
Jun 19, 2019, 5:45:19 AM6/19/19
to AdWords API and Google Ads API Forum
Hello Dannison,

I am also facing same issue while retrieving customer information.

I have MCC account which has access to this account.

What I need to do in this case?


Thanks

Google Ads API Forum Advisor Prod

unread,
Jun 19, 2019, 9:55:38 PM6/19/19
to adwor...@googlegroups.com
Hi,

If you are encountering the same error (TWO_STEP_VERIFICATION_NOT_ENROLLED), make sure you are enrolled with 2 step verification. You can enroll via this link.

cv

unread,
Jun 20, 2019, 6:16:01 AM6/20/19
to AdWords API and Google Ads API Forum
Hi Dannison,

Yes I was getting error
Failure: {"errors":[{"errorCode":{"authenticationError":"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."}]}  

Does this required for API call as well?

Please give me more details how it can be avoided using API.

Thanks,

Google Ads API Forum Advisor Prod

unread,
Jun 20, 2019, 9:59:47 PM6/20/19
to adwor...@googlegroups.com
Hi,

Unfortunately, there is so current solution to enroll the account for 2-step verification in the API. You have to login your Google Ads account and enroll in this link

After enrolling, you may now continue to make API calls. If the issue still persist, kindly let me know so I can further investigate.
Reply all
Reply to author
Forward
0 new messages