Quy trình xác minh danh tính nhà quảng cáo

Để mang đến một hệ sinh thái quảng cáo an toàn và đáng tin cậy cho người dùng, cũng như để tuân thủ các quy định mới, giờ đây, Google yêu cầu nhà quảng cáo phải hoàn tất một hoặc nhiều chương trình xác minh.

Nếu bạn được yêu cầu hoàn tất chương trình xác minh, thì bạn có thể đặt thời hạn cho quy trình xác minh. Nếu đã quá thời hạn mà không hoàn tất quy trình xác minh, tài khoản của bạn có thể bị tạm dừng.

Bạn cũng có thể chủ động thực hiện quy trình xác minh mà không bắt buộc phải thực hiện. IdentityVerificationService cung cấp các phương thức để thực hiện những việc sau:

  • Truy xuất trạng thái của quá trình xác minh cho tài khoản khách hàng, bao gồm cả mọi thời hạn
  • Bắt đầu quy trình xác minh

Truy xuất trạng thái xác minh

Để truy xuất trạng thái của quy trình xác minh danh tính nhà quảng cáo cho một tài khoản khách hàng, hãy gọi phương thức 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;
    }


}
      

1.199

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;
}
      

Nếu tài khoản khách hàng đã đăng ký tham gia chương trình xác minh danh tính nhà quảng cáo bắt buộc, thì dịch vụ sẽ trả về một phản hồi không trống chứa danh sách đối tượng IdentityVerification. Phản hồi trống cho biết rằng tài khoản khách hàng không bắt buộc phải thực hiện quy trình xác minh danh tính nhà quảng cáo.

Kể từ phiên bản 16, API Google Ads chỉ hỗ trợ chương trình ADVERTISER_IDENTITY_VERIFICATION, vì vậy, đó sẽ là mục duy nhất trong danh sách.

Đối tượng IdentityVerification chứa các thuộc tính sau:

  • IdentityVerificationRequirement mô tả thời hạn để bắt đầu và hoàn tất quy trình xác minh

  • Một IdentityVerificationProgress mô tả trạng thái hiện tại của quy trình xác minh: mã này cũng có thể bao gồm URL hành động để người dùng hoàn tất quy trình xác minh.

Bắt đầu quá trình xác minh

Nếu tài khoản khách hàng đã đăng ký tham gia chương trình xác minh danh tính nhà quảng cáo bắt buộc – GetIdentityVerification đã trả về một phản hồi không trống kèm theo thời hạn hoàn tất quy trình xác minh, thì bạn có thể bắt đầu phiên xác minh bằng cách gọi 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;
    }
}
      

1.199

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);
}
      

Thao tác này sẽ chỉ thành công nếu không có phiên xác minh nào khác đang diễn ra; sau khi bạn đã bắt đầu phiên xác minh, các lệnh gọi tiếp theo đến GetIdentityVerification sẽ trả về URL hành động để người dùng hoàn tất quy trình xác minh và thời gian hết hạn của URL hành động.

Khi thời gian hết hạn đã trôi qua, bạn có thể gọi lại StartIdentityVerification để bắt đầu phiên xác minh mới.