Bu kılavuzda, hizmet hesaplarıyla kendi kimlik bilgilerinizi kullanarak API erişimi için OAuth2'yi nasıl ayarlayacağınız açıklanmaktadır.
OAuth2 kimlik bilgilerinizi iptal etmediğiniz veya silmediğiniz sürece bu adımların yalnızca bir kez uygulanması gerekir.
Yapılandırmaya özel anahtar JSON'u ve kimliğine bürünüldüğü e-posta adresi ekleme
Yapılandırmanızda özel anahtar JSON dosyası yolunu ve kimliğine bürünen e-postayı ayarlayın.
google-ads.yaml dosyası, YAML dizesi veya dict kullanıyorsanız aşağıdakileri ekleyin:
[null,null,["Son güncelleme tarihi: 2025-03-04 UTC."],[[["This guide explains how to set up OAuth2 for API access using service accounts, a one-time process unless credentials are revoked."],["The setup requires a Google Workspace domain and a service account with domain-wide delegation access granted by a super administrator."],["You need to generate a service account ID and a JSON file, then add the private key JSON file path and impersonated email to your configuration."],["Configuration can be set using a `google-ads.yaml` file, YAML string, `dict`, or environment variables."],["The library prioritizes credentials for desktop or web app flows, so ensure these are not present if you want to use Service Account authentication."]]],[]]