Untuk menyediakan ekosistem iklan yang aman dan tepercaya bagi pengguna serta mematuhi peraturan yang berlaku, Google kini mewajibkan pengiklan untuk menyelesaikan satu atau beberapa program verifikasi.
Jika Anda diwajibkan untuk menyelesaikan program verifikasi, batas waktu mungkin akan ditetapkan untuk proses verifikasi. Jika batas waktu terlewati tanpa penyelesaian verifikasi, akun Anda dapat dijeda.
Anda juga dapat menjalani verifikasi secara proaktif tanpa harus melakukannya.
IdentityVerificationService
menawarkan metode untuk melakukan hal berikut:
- Mengambil status proses verifikasi untuk akun pelanggan, termasuk batas waktu
- Memulai proses verifikasi
Mengambil status verifikasi
Untuk mengambil status proses verifikasi identitas pengiklan untuk
akun pelanggan, panggil metode GetIdentityVerification
:
Java
This example is not yet available in Java; you can take a look at the other languages.
C#
private static IdentityVerification GetIdentityVerification( GoogleAdsClient client, long customerId) { IdentityVerificationServiceClient identityVerificationService = client.GetService(Services.V16.IdentityVerificationService); try { GetIdentityVerificationResponse response = identityVerificationService.GetIdentityVerification( new GetIdentityVerificationRequest() { CustomerId = customerId.ToString() } ); if (response.IdentityVerification.Count == 0) { return null; } IdentityVerification identityVerification = response.IdentityVerification[0]; string deadline = identityVerification.IdentityVerificationRequirement.VerificationCompletionDeadlineTime; IdentityVerificationProgress identityVerificationProgress = identityVerification.VerificationProgress; Console.WriteLine($"Account {customerId} has a verification completion " + $"deadline of {deadline} and status " + $"{identityVerificationProgress.ProgramStatus} for advertiser identity " + "verification."); return identityVerification; } catch (GoogleAdsException e) { Console.WriteLine("Failure:"); Console.WriteLine($"Message: {e.Message}"); Console.WriteLine($"Failure: {e.Failure}"); Console.WriteLine($"Request ID: {e.RequestId}"); throw; } }
PHP
This example is not yet available in PHP; you can take a look at the other languages.
Python
This example is not yet available in Python; you can take a look at the other languages.
Ruby
def get_identity_verification(client, customer_id) response = client.service.identity_verification.get_identity_verification( customer_id: customer_id ) return nil if response.nil? || response.identity_verification.empty? identity_verification = response.identity_verification.first deadline = identity_verification. identity_verification_requirement. verification_completion_deadline_time progress = identity_verification.verification_progress puts "Account #{customer_id} has a verification completion deadline " \ "of #{deadline} and status #{progress.program_status} for advertiser " \ "identity verification." identity_verification end
Perl
sub get_identity_verification { my ($api_client, $customer_id) = @_; my $response = $api_client->IdentityVerificationService()->get({ customerId => $customer_id }); if (!defined $response->{identityVerification}) { printf "Account %s does not require advertiser identity verification.", $customer_id; return; } my $identity_verification = $response->{identityVerification}[0]; my $deadline = $identity_verification->{identityVerificationRequirement} {verificationCompletionDeadlineTime}; my $identity_verification_progress = $identity_verification->{verificationProgress}; printf "Account %s has a verification completion deadline of %s and status " . "%s for advertiser identity verification.", $customer_id, $deadline, $identity_verification_progress->{programStatus}; return $identity_verification; }
Jika akun pelanggan terdaftar dalam program verifikasi identitas pengiklan wajib, layanan akan menampilkan respons yang tidak kosong yang berisi daftar objek IdentityVerification
. Respons yang kosong menunjukkan bahwa akun pelanggan tidak diwajibkan untuk menjalani verifikasi identitas pengiklan.
Mulai v16, Google Ads API hanya mendukung program ADVERTISER_IDENTITY_VERIFICATION
, sehingga akan menjadi satu-satunya item dalam daftar.
Objek IdentityVerification
berisi properti berikut:
IdentityVerificationRequirement
yang menjelaskan batas waktu untuk memulai dan menyelesaikan proses verifikasiIdentityVerificationProgress
yang menjelaskan status proses verifikasi saat ini: ini juga dapat mencakup URL tindakan bagi pengguna untuk menyelesaikan proses verifikasi.
Mulai proses verifikasi
Jika akun pelanggan terdaftar dalam program verifikasi identitas pengiklan wajib — GetIdentityVerification
menampilkan respons yang tidak kosong dengan batas waktu penyelesaian proses verifikasi, Anda dapat memulai sesi verifikasi dengan memanggil StartIdentityVerification
:
Java
This example is not yet available in Java; you can take a look at the other languages.
C#
private static void StartIdentityVerification(GoogleAdsClient client, long customerId) { IdentityVerificationServiceClient identityVerificationService = client.GetService(Services.V16.IdentityVerificationService); StartIdentityVerificationRequest request = new StartIdentityVerificationRequest() { CustomerId = customerId.ToString(), VerificationProgram = IdentityVerificationProgram.AdvertiserIdentityVerification }; try { identityVerificationService.StartIdentityVerification(request); } catch (GoogleAdsException e) { Console.WriteLine("Failure:"); Console.WriteLine($"Message: {e.Message}"); Console.WriteLine($"Failure: {e.Failure}"); Console.WriteLine($"Request ID: {e.RequestId}"); throw; } }
PHP
This example is not yet available in PHP; you can take a look at the other languages.
Python
This example is not yet available in Python; you can take a look at the other languages.
Ruby
def start_identity_verification(client, customer_id) client.service.identity_verification.start_identity_verification( customer_id: customer_id, verification_program: :ADVERTISER_IDENTITY_VERIFICATION, ) end
Perl
sub start_identity_verification { my ($api_client, $customer_id) = @_; my $request = Google::Ads::GoogleAds::V16::Services::IdentityVerificationService::StartIdentityVerificationRequest ->new({ customerId => $customer_id, verificationProgram => ADVERTISER_IDENTITY_VERIFICATION }); $api_client->AdvertiserIdentityVerificationService() ->start_identity_verification($request); }
Tindakan ini hanya akan berhasil jika tidak ada sesi verifikasi lainnya yang sedang berlangsung;
setelah Anda memulai sesi verifikasi, panggilan berikutnya ke
GetIdentityVerification
akan menampilkan URL tindakan bagi pengguna untuk menyelesaikan
proses verifikasi dan waktu habis masa berlaku URL tindakan.
Setelah masa berlaku habis, Anda dapat memanggil
StartIdentityVerification
lagi untuk memulai sesi verifikasi baru.