หากสนใจแชร์ความคิดเห็นเกี่ยวกับ Google Ads API
ลงชื่อสมัครเพื่อรับคำเชิญให้เข้าร่วมการศึกษาวิจัยผู้ใช้
โฟลว์บัญชีบริการ OAuth
คู่มือนี้จะอธิบายวิธีตั้งค่า OAuth2 สำหรับการเข้าถึง API โดยใช้ข้อมูลเข้าสู่ระบบของคุณเองโดยใช้บัญชีบริการ
ขั้นตอนเหล่านี้จะทำเพียงครั้งเดียว เว้นแต่คุณจะเพิกถอนหรือลบข้อมูลเข้าสู่ระบบ OAuth2
สร้างข้อมูลเข้าสู่ระบบ OAuth2
สร้างรหัสบัญชีบริการและไฟล์ *.JSON โดยทําตามวิธีการที่ลิงก์ไว้ แล้วกลับมาที่หน้านี้
ตั้งค่าไลบรารีไคลเอ็นต์ด้วยไฟล์ JSON
กําหนดค่าคีย์ต่อไปนี้ใน App.config / Web.config
ดูรายละเอียดเพิ่มเติมได้ในคู่มือการกําหนดค่า
<add key="OAuth2Mode" value="SERVICE_ACCOUNT" />
<add key="OAuth2SecretsJsonPath" value="INSERT_OAUTH2_SECRETS_JSON_FILE_PATH_HERE" />
<!-- Supply the email address of the user to impersonate. -->
<add key="OAuth2PrnEmail" value="INSERT_OAUTH2_USER_EMAIL_HERE" />
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-02-28 UTC
[null,null,["อัปเดตล่าสุด 2025-02-28 UTC"],[[["The Google Ads API client library for .NET will no longer support .NET 5.0 starting with version 19.0.0, and upgrading before the end of 2024 is recommended."],["This guide explains how to set up OAuth2 for API access using service accounts, requiring a Google Workspace domain and domain-wide delegation access granted to the service account."],["Users need to generate a service account ID and JSON file before proceeding with client library configuration."],["Configuration involves setting keys in `App.config` or `Web.config`, including OAuth2Mode, OAuth2SecretsJsonPath, and OAuth2PrnEmail."]]],[]]