Xác minh 2 bước
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Uỷ quyền cho Google Ads hỗ trợ việc bật tính năng Xác minh 2 bước trên tài khoản Google Ads. Bảng sau đây trình bày 3 trường hợp để bật tính năng Xác minh 2 bước.
Người dùng bật tính năng Xác minh 2 bước trên Tài khoản Google của riêng họ
|
Người dùng có thể tự quyết định bật tính năng Xác minh 2 bước cho Tài khoản Google của mình.
Sau khi bật tính năng Xác minh 2 bước
Trong quy trình xác thực OAuth2, Google sẽ nhắc người dùng thực hiện quy trình Xác minh 2 bước trước khi cấp mã làm mới.
Sau khi được phát hành, mã làm mới có thể được dùng để tạo mã truy cập cần thiết trong các lệnh gọi API.
Mã làm mới trước đó
Mã làm mới được cấp trước khi người dùng bật tính năng Xác minh 2 bước vẫn hợp lệ sau khi người dùng bật tính năng này. Bạn có thể dùng mã làm mới để phát hành mã truy cập hợp lệ như bình thường.
|
Quản trị viên yêu cầu người dùng tài khoản Google Ads bật tính năng Xác minh 2 bước trong Tài khoản Google của họ
|
Quản trị viên tài khoản có thể yêu cầu tất cả người dùng của một tài khoản Google Ads phải bật tính năng Xác minh 2 bước trên Tài khoản Google của họ.
Người dùng bật tính năng Xác minh 2 bước
Trong quy trình xác thực OAuth2, Google sẽ nhắc người dùng thực hiện quy trình Xác minh 2 bước trước khi cấp mã làm mới.
Sau khi được phát hành, mã làm mới có thể được dùng để tạo mã truy cập cần thiết trong các lệnh gọi API.
Người dùng không bật tính năng Xác minh 2 bước
Trong quy trình xác thực, người dùng sẽ không thấy lời nhắc Xác minh 2 bước. Trải nghiệm này độc lập với mọi chế độ cài đặt trên tài khoản Google Ads.
Sau khi được cấp, mã làm mới có thể được dùng để cấp mã truy cập. Tuy nhiên, các lệnh gọi API được thực hiện bằng mã truy cập này sẽ gặp lỗi
TWO_STEP_VERIFICATION_NOT_ENROLLED cho đến khi người dùng bật tính năng Xác minh 2 bước trong Tài khoản Google của họ.
Mã làm mới trước đó
Quy tắc này cũng áp dụng cho mã làm mới được phát hành trước khi có yêu cầu Xác minh 2 bước. Mã làm mới có thể dùng để tạo mã truy cập, nhưng các lệnh gọi API được thực hiện bằng những mã truy cập này sẽ gặp lỗi
TWO_STEP_VERIFICATION_NOT_ENROLLED cho đến khi người dùng bật tính năng Xác minh 2 bước trong Tài khoản Google của họ.
|
Google yêu cầu tất cả người dùng tài khoản Google Ads phải chọn sử dụng tính năng xác minh 2 bước trên Tài khoản Google của họ {:#require-2-step}
|
Trong một số trường hợp, Google có thể yêu cầu tất cả người dùng của một tài khoản Google Ads bật tính năng xác minh 2 bước trên Tài khoản Google của họ.
Sau khi bật tính năng Xác minh 2 bước
Trong quy trình xác thực OAuth2, Google sẽ nhắc người dùng thực hiện quy trình Xác minh 2 bước trước khi cấp mã làm mới.
Trải nghiệm này không phụ thuộc vào việc Google có chọn yêu cầu tất cả người dùng bật xác minh 2 yếu tố cho tài khoản Google Ads hay không.
Sau khi được phát hành, mã làm mới có thể được dùng để tạo mã truy cập cần thiết trong các lệnh gọi API như bình thường.
Mã làm mới trước đó
Mã làm mới được cấp trước khi người dùng bật tính năng Xác minh 2 bước vẫn hợp lệ sau khi người dùng bật tính năng này. Bạn có thể dùng mã làm mới để phát hành mã truy cập hợp lệ như bình thường.
Các lệnh gọi API được thực hiện bằng mã truy cập này sẽ không gặp phải lỗi TWO_STEP_VERIFICATION_NOT_ENROLLED vì lựa chọn sử dụng tính năng Xác minh 2 bước do Google chứ không phải quản trị viên tài khoản Google Ads khởi tạo.
|
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2025-08-27 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2025-08-27 UTC."],[[["\u003cp\u003eGoogle Ads authorization supports enabling 2-Step Verification for enhanced security, impacting how refresh and access tokens function.\u003c/p\u003e\n"],["\u003cp\u003eUsers voluntarily enabling 2-Step Verification or being required to by administrators or Google will encounter a 2-Step Verification prompt during authentication.\u003c/p\u003e\n"],["\u003cp\u003eIf an administrator requires 2-Step Verification, API calls will fail with an error until it's enabled, even with existing refresh tokens.\u003c/p\u003e\n"],["\u003cp\u003eRefresh tokens issued before enabling 2-Step Verification generally remain valid but may be subject to the specific scenario and enforcement level.\u003c/p\u003e\n"],["\u003cp\u003eGoogle enforcing 2-Step Verification differs from administrator enforcement, as API calls with existing refresh tokens won't encounter the \u003ccode\u003eTWO_STEP_VERIFICATION_NOT_ENROLLED\u003c/code\u003e error.\u003c/p\u003e\n"]]],[],null,["# 2-Step Verification\n\nGoogle Ads authorization supports enabling [2-Step Verification on your Google Ads\naccount](//support.google.com/google-ads/answer/12864186). The following table\npresents the three scenarios for enabling 2-Step Verification.\n\n|-----------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ### User turns on 2-Step Verification on their own Google Account | *A user might decide on their own to turn on 2-Step Verification for their Google Account.* #### After 2-Step Verification is enabled During the [OAuth2 authentication flow](/google-ads/api/docs/oauth/client-library), Google prompts the user for 2-Step Verification before issuing a refresh token. Once issued, the refresh token can be used to generate the access token needed in API calls. #### Previous refresh tokens A refresh token that was issued before the user enabled 2-Step Verification remains valid after the user enables 2-Step Verification. The refresh token can be used to issue valid access tokens as usual. |\n| ### Administrator requires users of a Google Ads account to enable 2-Step Verification on their Google Account | *An account administrator can require all users of a Google Ads account to [enable 2-Step Verification](https://support.google.com/google-ads/answer/12865295) on their Google Account.* #### User enables 2-Step Verification During the [OAuth2 authentication flow](/google-ads/api/docs/oauth/client-library), Google prompts the user for 2-Step Verification before issuing a refresh token. Once issued, the refresh token can be used to generate the access token needed in API calls. #### User doesn't enable 2-Step Verification During the authentication flow, the user won't see the 2-Step Verification prompt. This experience is independent of any settings on the Google Ads account. Once issued, the refresh token can be used to issue access tokens. However, the API calls made using this access token will fail with a [`TWO_STEP_VERIFICATION_NOT_ENROLLED`](/google-ads/api/reference/rpc/v21/AuthenticationErrorEnum.AuthenticationError#two_step_verification_not_enrolled) error until the user enables 2-Step Verification in their Google Account. ##### Previous refresh tokens This rule applies to refresh tokens issued prior to the 2-Step Verification requirement as well---the refresh token can be used to generate access tokens, but API calls made with these access tokens will fail with a [`TWO_STEP_VERIFICATION_NOT_ENROLLED`](/google-ads/api/reference/rpc/v21/AuthenticationErrorEnum.AuthenticationError#two_step_verification_not_enrolled) error until the user enables 2-Step Verification in their Google Account. |\n| ### Google requires all users of a Google Ads account to opt in to 2-step verification on their Google Account {:#require-2-step} | *In some cases, Google might require all users of a Google Ads account to enable 2-step verification on their Google Account.* #### After 2-Step Verification is enabled During the [OAuth2 authentication flow](/google-ads/api/docs/oauth/client-library), Google prompts the user for 2-Step Verification before issuing a refresh token. This experience is independent of whether Google opted in the Google Ads account to require all its users to enable 2-factor verification. Once issued, the refresh token can be used to generate the access token needed in API calls as usual. #### Previous refresh tokens A refresh token that was issued before the user enabled 2-Step Verification remains valid after the user enables 2-Step Verification. The refresh token can be used to issue a valid access token as usual. API calls made using this access token won't encounter the `TWO_STEP_VERIFICATION_NOT_ENROLLED` error because the 2-Step Verification opt-in was initiated by Google and not by the Google Ads account administrator. |"]]