Dokumen ini menunjukkan cara menyiapkan lingkungan untuk menyiapkan reCAPTCHA.
Sebelum memulai
Untuk mulai menggunakan reCAPTCHA, lakukan hal berikut:
Daftar untuk membuat Akun Google di konsolGoogle Cloud .
In the Google Cloud console, on the project selector page, select or create a Google Cloud project.
Aktifkan reCAPTCHA Enterprise API
Konsol
Di konsol Google Cloud , buka halaman reCAPTCHA Enterprise API.
Pastikan nama project Anda muncul di pemilih project di bagian atas halaman.
Jika Anda tidak melihat nama project, klik pemilih project, lalu pilih project Anda.
- Klik Enable.
gcloud
-
In the Google Cloud console, activate Cloud Shell.
At the bottom of the Google Cloud console, a Cloud Shell session starts and displays a command-line prompt. Cloud Shell is a shell environment with the Google Cloud CLI already installed and with values already set for your current project. It can take a few seconds for the session to initialize.
- Untuk menetapkan project Google Cloud Anda di sesi gcloud, jalankan perintah
gcloud config set project
. Ganti PROJECT_ID dengan Google Cloud project ID Anda.gcloud config set project PROJECT_ID
- Untuk mengaktifkan reCAPTCHA Enterprise API, jalankan perintah
gcloud services enable
:gcloud services enable recaptchaenterprise.googleapis.com
- Untuk memverifikasi bahwa reCAPTCHA Enterprise API sudah diaktifkan, jalankan perintah
gcloud services list
:gcloud services list --enabled
Pastikan reCAPTCHA Enterprise API tercantum dalam daftar API yang diaktifkan.
Mengonfigurasi peran dan izin
Untuk mendapatkan izin yang diperlukan untuk menyiapkan reCAPTCHA, minta administrator Anda untuk memberi Anda peran IAM berikut di project:
-
Admin reCAPTCHA Enterprise (
roles/recaptchaenterprise.admin
) -
Agen reCAPTCHA Enterprise (
roles/recaptchaenterprise.agent
)
Untuk mengetahui informasi selengkapnya tentang cara memberikan peran, lihat Mengelola akses ke project, folder, dan organisasi.
Anda mungkin juga bisa mendapatkan izin yang diperlukan melalui peran khusus atau peran bawaan lainnya.
Untuk mengetahui informasi selengkapnya tentang kontrol akses untuk reCAPTCHA, lihat Kontrol akses dengan IAM.