Verifikasi 2 Langkah
Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Otorisasi Google Ads mendukung pengaktifan Verifikasi 2 Langkah di akun Google Ads Anda. Tabel berikut menyajikan tiga skenario untuk mengaktifkan Verifikasi 2 Langkah.
Pengguna mengaktifkan Verifikasi 2 Langkah di Akun Google-nya sendiri
|
Pengguna dapat memutuskan sendiri untuk mengaktifkan Verifikasi 2 Langkah untuk Akun Google-nya.
Setelah Verifikasi 2 Langkah diaktifkan
Selama
alur autentikasi OAuth2,
Google akan meminta pengguna untuk melakukan Verifikasi 2 Langkah sebelum mengeluarkan token refresh.
Setelah dikeluarkan, token refresh dapat digunakan untuk membuat token akses yang diperlukan dalam panggilan API.
Token refresh sebelumnya
Token refresh yang dikeluarkan sebelum pengguna mengaktifkan Verifikasi 2 Langkah
tetap valid setelah pengguna mengaktifkan Verifikasi 2 Langkah. Token refresh dapat
digunakan untuk menerbitkan token akses yang valid seperti biasa.
|
Administrator mewajibkan pengguna akun Google Ads untuk mengaktifkan Verifikasi 2 Langkah di Akun Google mereka
|
Administrator akun dapat mewajibkan semua pengguna akun Google Ads untuk
mengaktifkan Verifikasi 2 Langkah
di Akun Google mereka.
Pengguna mengaktifkan Verifikasi 2 Langkah
Selama
alur autentikasi OAuth2,
Google akan meminta pengguna untuk melakukan Verifikasi 2 Langkah sebelum mengeluarkan token refresh.
Setelah dikeluarkan, token refresh dapat digunakan untuk membuat token akses yang diperlukan dalam panggilan API.
Pengguna tidak mengaktifkan Verifikasi 2 Langkah
Selama alur autentikasi, pengguna tidak akan melihat perintah Verifikasi 2 Langkah. Pengalaman ini tidak bergantung pada setelan apa pun di akun Google Ads.
Setelah dikeluarkan, token refresh dapat digunakan untuk mengeluarkan token akses. Namun,
panggilan API yang dilakukan menggunakan token akses ini akan gagal dengan error
TWO_STEP_VERIFICATION_NOT_ENROLLED hingga pengguna mengaktifkan
Verifikasi 2 Langkah di Akun Google mereka.
Token refresh sebelumnya
Aturan ini juga berlaku untuk token penggantian yang dikeluarkan sebelum persyaratan Verifikasi 2 Langkah. Token penggantian dapat digunakan untuk membuat token akses, tetapi panggilan API yang dilakukan dengan token akses ini akan gagal dengan error
TWO_STEP_VERIFICATION_NOT_ENROLLED
hingga pengguna mengaktifkan Verifikasi 2 Langkah di Akun Google-nya.
|
Google mewajibkan semua pengguna akun Google Ads untuk mengaktifkan verifikasi 2 langkah di Akun Google mereka {:#require-2-step}
|
Dalam beberapa kasus, Google mungkin mewajibkan semua pengguna akun Google Ads untuk mengaktifkan verifikasi 2 langkah di Akun Google mereka.
Setelah Verifikasi 2 Langkah diaktifkan
Selama alur autentikasi OAuth2,
Google akan meminta pengguna untuk melakukan Verifikasi 2 Langkah sebelum mengeluarkan token refresh.
Pengalaman ini terlepas dari apakah Google mengikutsertakan akun Google Ads untuk mewajibkan semua penggunanya mengaktifkan verifikasi 2 faktor.
Setelah dikeluarkan, token refresh dapat digunakan untuk membuat token akses
yang diperlukan dalam panggilan API seperti biasa.
Token refresh sebelumnya
Token refresh yang dikeluarkan sebelum pengguna mengaktifkan Verifikasi 2 Langkah
tetap valid setelah pengguna mengaktifkan Verifikasi 2 Langkah. Token refresh dapat
digunakan untuk menerbitkan token akses yang valid seperti biasa.
Panggilan API yang dilakukan menggunakan token akses ini tidak akan mengalami error TWO_STEP_VERIFICATION_NOT_ENROLLED karena pengaktifan Verifikasi 2 Langkah dimulai oleh Google, bukan oleh administrator akun Google Ads.
|
Kecuali dinyatakan lain, konten di halaman ini dilisensikan berdasarkan Lisensi Creative Commons Attribution 4.0, sedangkan contoh kode dilisensikan berdasarkan Lisensi Apache 2.0. Untuk mengetahui informasi selengkapnya, lihat Kebijakan Situs Google Developers. Java adalah merek dagang terdaftar dari Oracle dan/atau afiliasinya.
Terakhir diperbarui pada 2025-08-27 UTC.
[null,null,["Terakhir diperbarui pada 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. |"]]