ขณะนี้ Google กำหนดให้ผู้ลงโฆษณาปฏิบัติตามโปรแกรมการยืนยันอย่างน้อย 1 รายการ เพื่อสร้างระบบนิเวศที่ปลอดภัยและน่าเชื่อถือสำหรับผู้ใช้ และเป็นไปตามกฎระเบียบที่กำลังเกิดขึ้น
หากคุณต้องทำตามขั้นตอนในโปรแกรมการยืนยัน เราอาจกำหนดเวลาสำหรับกระบวนการยืนยันไว้ หากเลยกำหนดเวลาไว้โดยไม่ได้ดำเนินการยืนยันให้เสร็จสมบูรณ์ บัญชีของคุณอาจถูกระงับชั่วคราว
นอกจากนี้คุณยังดำเนินการยืนยันด้วยตนเองได้โดยไม่ต้องดำเนินการดังกล่าว
IdentityVerificationService
มีวิธีดำเนินการดังต่อไปนี้
- ดึงข้อมูลสถานะของกระบวนการยืนยันตัวตนสำหรับบัญชีลูกค้า รวมถึงกำหนดเวลาทั้งหมด
- เริ่มกระบวนการยืนยัน
เรียกดูสถานะการยืนยัน
หากต้องการดึงข้อมูลสถานะกระบวนการยืนยันตัวตนของผู้ลงโฆษณาสำหรับบัญชีลูกค้า ให้เรียกใช้เมธอด 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.V17.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; }
หากบัญชีลูกค้าลงทะเบียนในโปรแกรมการยืนยันตัวตนของผู้ลงโฆษณาที่จำเป็น บริการจะแสดงการตอบกลับที่ไม่ว่างเปล่าซึ่งมีรายการออบเจ็กต์ IdentityVerification
การตอบกลับที่ว่างเปล่าหมายความว่าบัญชีลูกค้าไม่จำเป็นต้องทำการยืนยันตัวตนของผู้ลงโฆษณา
ตั้งแต่เวอร์ชัน 16 เป็นต้นไป Google Ads API รองรับเฉพาะโปรแกรม ADVERTISER_IDENTITY_VERIFICATION
เท่านั้น ดังนั้นนี่จะเป็นเพียงรายการเดียวในลิสต์
ออบเจ็กต์ IdentityVerification
มีคุณสมบัติต่อไปนี้
IdentityVerificationRequirement
ซึ่งอธิบายกำหนดเวลาในการเริ่มดำเนินการ และดำเนินการยืนยันตัวตนให้เสร็จสมบูรณ์IdentityVerificationProgress
ที่อธิบายสถานะปัจจุบันของกระบวนการยืนยันตัวตน ข้อมูลนี้ยังอาจรวมถึง URL การดำเนินการของผู้ใช้เพื่อดำเนินการยืนยันให้เสร็จสมบูรณ์ด้วย
เริ่มขั้นตอนการยืนยัน
หากบัญชีลูกค้าลงทะเบียนในโปรแกรมการยืนยันตัวตนของผู้ลงโฆษณาที่จำเป็น GetIdentityVerification
ส่งคืนการตอบกลับที่ไม่ว่างเปล่าซึ่งมีกำหนดเวลาสำหรับการดำเนินการยืนยันตัวตนให้เสร็จสมบูรณ์ คุณจะเริ่มเซสชันการยืนยันตัวตนได้โดยโทรไปที่ 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.V17.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::V17::Services::IdentityVerificationService::StartIdentityVerificationRequest ->new({ customerId => $customer_id, verificationProgram => ADVERTISER_IDENTITY_VERIFICATION }); $api_client->AdvertiserIdentityVerificationService() ->start_identity_verification($request); }
วิธีนี้จะสำเร็จก็ต่อเมื่อไม่มีเซสชันการยืนยันอื่นอยู่ระหว่างดำเนินการ เมื่อเริ่มเซสชันการยืนยันแล้ว การเรียกไปยัง GetIdentityVerification
ในภายหลังจะแสดง URL การดำเนินการเพื่อให้ผู้ใช้ดำเนินการตามกระบวนการยืนยันให้เสร็จสมบูรณ์และเวลาหมดอายุของ URL การดำเนินการ
หลังจากผ่านเวลาหมดอายุไปแล้ว คุณจะโทรหา StartIdentityVerification
อีกครั้งเพื่อเริ่มเซสชันการยืนยันใหม่ได้