تایید 2 مرحله ای، تایید 2 مرحله ای
با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
مجوز Google Ads از فعال کردن تأیید صحت 2 مرحلهای در حساب Google Ads شما پشتیبانی میکند. جدول زیر سه سناریو برای فعال کردن تأیید صحت 2 مرحله ای را ارائه می دهد.
کاربر تأیید صحت 2 مرحلهای را در حساب Google خود روشن میکند | ممکن است یک کاربر به تنهایی تصمیم بگیرد که تأیید صحت دو مرحلهای را برای حساب Google خود روشن کند. پس از فعال شدن تأیید صحت 2 مرحله ای در طول جریان احراز هویت OAuth2 ، Google از کاربر درخواست میکند تا قبل از صدور یک نشانه تازهسازی، تأیید صحت 2 مرحلهای را انجام دهد. پس از صدور، توکن بهروزرسانی میتواند برای تولید نشانه دسترسی مورد نیاز در تماسهای API استفاده شود. نشانههای تازهسازی قبلی یک نشانه بهروزرسانی که قبل از فعال کردن تأیید صحت 2 مرحلهای توسط کاربر صادر شده بود، پس از فعال کردن تأیید صحت 2 مرحلهای توسط کاربر همچنان معتبر باقی میماند. نشانه رفرش را می توان برای صدور توکن های دسترسی معتبر طبق معمول استفاده کرد. |
سرپرست از کاربران یک حساب Google Ads میخواهد تا تأیید صحت ۲ مرحلهای را در حساب Google خود فعال کنند | یک سرپرست حساب میتواند از همه کاربران یک حساب Google Ads بخواهد که تأیید صحت ۲ مرحلهای را در حساب Google خود فعال کنند . کاربر تأیید صحت 2 مرحله ای را فعال می کند در طول جریان احراز هویت OAuth2 ، Google از کاربر درخواست میکند تا قبل از صدور یک نشانه تازهسازی، تأیید صحت 2 مرحلهای را انجام دهد. پس از صدور، توکن بهروزرسانی میتواند برای تولید نشانه دسترسی مورد نیاز در تماسهای API استفاده شود. کاربر تأیید صحت 2 مرحله ای را فعال نمی کند در طول جریان احراز هویت، کاربر اعلان تأیید صحت 2 مرحلهای را نمیبیند. این تجربه مستقل از تنظیمات در حساب Google Ads است. پس از صدور، نشانه رفرش می تواند برای صدور توکن های دسترسی استفاده شود. با این حال، تماسهای API که با استفاده از این نشانه دسترسی انجام میشوند، با خطای TWO_STEP_VERIFICATION_NOT_ENROLLED ناموفق خواهند بود تا زمانی که کاربر تأیید صحت 2 مرحلهای را در حساب Google خود فعال کند. نشانههای تازهسازی قبلی این قانون برای نشانههای تازهسازی صادر شده قبل از الزام تأیید صحت 2 مرحلهای نیز اعمال میشود - رمز تازهسازی را میتوان برای تولید نشانههای دسترسی استفاده کرد، اما تماسهای API انجامشده با این نشانههای دسترسی با خطای TWO_STEP_VERIFICATION_NOT_ENROLLED تا زمانی که کاربر تأیید اعتبار ۲مرحلهای را در Google خود فعال نکند، انجام نمیشود. |
Google از همه کاربران یک حساب Google Ads میخواهد که تأیید صحت دو مرحلهای را در حساب Google خود انتخاب کنند {:#require-2-step} | در برخی موارد، ممکن است Google از همه کاربران یک حساب Google Ads بخواهد تا تأیید صحت 2 مرحلهای را در حساب Google خود فعال کنند. پس از فعال شدن تأیید صحت 2 مرحله ای در طول جریان احراز هویت OAuth2 ، Google از کاربر درخواست میکند تا قبل از صدور یک نشانه تازهسازی، تأیید صحت 2 مرحلهای را انجام دهد. این تجربه مستقل از این است که آیا Google در حساب Google Ads شرکت کرده است تا از همه کاربران خود بخواهد تأیید صحت 2 عاملی را فعال کنند. پس از صدور، توکن بهروزرسانی میتواند طبق معمول برای تولید نشانه دسترسی مورد نیاز در تماسهای API استفاده شود. نشانههای تازهسازی قبلی یک نشانه بهروزرسانی که قبل از فعال کردن تأیید صحت 2 مرحلهای توسط کاربر صادر شده بود، پس از فعال کردن تأیید صحت 2 مرحلهای توسط کاربر همچنان معتبر باقی میماند. توکن refresh را می توان طبق معمول برای صدور یک نشانه دسترسی معتبر استفاده کرد. تماسهای API که با استفاده از این نشانه دسترسی انجام میشوند، با خطای TWO_STEP_VERIFICATION_NOT_ENROLLED مواجه نمیشوند، زیرا انتخاب تأیید صحت 2 مرحلهای توسط Google و نه توسط سرپرست حساب Google Ads آغاز شده است. |
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2025-08-26 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2025-08-26 بهوقت ساعت هماهنگ جهانی."],[[["\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. |"]]