เลือกประเภทแอปพลิเคชัน
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
เนื่องจากบัญชี Google Ads มีข้อมูลผู้ใช้ แอปพลิเคชันของคุณจึงต้องขอรับการให้สิทธิ์จากผู้ใช้เพื่อเข้าถึงข้อมูลนี้
แนวทางกว้างๆ มี 2 วิธี
โดยขึ้นอยู่กับวิธีที่คุณขอรับการให้สิทธิ์นี้
เลือกประเภทแอป
เนื่องจากบัญชี Google Ads มีข้อมูลผู้ใช้ แอปของคุณจึงต้องขอ
การให้สิทธิ์จากผู้ใช้เพื่อเข้าถึงข้อมูลนี้ แนวทางกว้างๆ มี 2 วิธี
โดยขึ้นอยู่กับวิธีที่คุณขอรับการให้สิทธิ์นี้
|
บัญชีบริการ |
การตรวจสอบสิทธิ์ของผู้ใช้ |
สรุป |
กำหนดค่าบัญชี Google Ads ด้วยตนเองเพื่อให้สิทธิ์เข้าถึงบัญชีนั้นแก่บัญชีบริการ
หลังจากนั้น แอปจะใช้ข้อมูลเข้าสู่ระบบของบัญชีบริการ
เพื่อทำการเรียก API ไปยังบัญชี Google Ads ได้โดยไม่ต้องมีการโต้ตอบจากผู้ใช้
การเรียก API จะทํางานได้ตราบใดที่บัญชีบริการมีสิทธิ์เข้าถึง
บัญชี Google Ads |
ขอการให้สิทธิ์ OAuth 2.0 แบบครั้งเดียวจากผู้ใช้เพื่อ
อนุญาตให้แอปจัดการบัญชี Google Ads ของผู้ใช้ หลังจากนั้น แอปจะใช้โทเค็นการรีเฟรช OAuth 2.0 (ซึ่งออกให้เป็นส่วนหนึ่งของกระบวนการให้สิทธิ์ OAuth 2.0) เพื่อทำการเรียก API ไปยังบัญชี Google Ads ได้ การเรียก API
จะทำงานตราบใดที่ผู้ใช้ไม่เพิกถอนการให้สิทธิ์ หรือจนกว่า
การให้สิทธิ์จะหมดอายุเนื่องจากไม่มีการใช้งานหรือเหตุผลอื่นๆ |
ใช้งานง่าย |
ต้องมีการกำหนดค่าและการอนุมัติขั้นต่ำเนื่องจากไม่มีการให้สิทธิ์ผู้ใช้ในแอป |
ต้องมีการกำหนดค่าและการอนุมัติอย่างละเอียดเนื่องจากการตรวจสอบสิทธิ์ผู้ใช้
เป็นส่วนหนึ่งของแอป |
คำแนะนำ |
ขอแนะนำให้ใช้เป็นแนวทางที่ต้องการ |
แนวทางเดิม ใช้เป็นตัวเลือกสำรองเมื่อคุณไม่สามารถให้สิทธิ์ที่จำเป็นแก่บัญชีบริการในบัญชี Google Ads |
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-09-05 UTC
[null,null,["อัปเดตล่าสุด 2025-09-05 UTC"],[],[],null,["# Choose your application type\n\nSince Google Ads accounts contain user data, your application must obtain\nauthorization from the user to access this data. There are two broad approaches\nbased on how you obtain this authorization.\n\nChoose your app type\n--------------------\n\nSince Google Ads accounts contain user data, your app needs to obtain\nauthorization from the user to access this data. There are two broad approaches\nbased on how you obtain this authorization.\n\n| | **Service Account** | **User Authentication** |\n| Summary | Manually configure your Google Ads account to give a service account access to that account. Afterwards, your app can use the service account credentials to make API calls to the Google Ads account without any user interaction. The API calls work as long as the service account has access to the Google Ads account. | Obtain a one-time OAuth 2.0 authorization from a user to allow your app to manage their Google Ads account. Afterwards, your app can use the OAuth 2.0 refresh token (issued as part of the OAuth 2.0 authorization process) to make API calls to the Google Ads account. The API calls work as long as the user doesn't revoke the authorization, or until the authorization expires due to inactivity or other reasons. |\n| Ease of use | Minimal configuration and approvals required due to lack of user authorization in the app. | Extensive configuration and approvals required due to user authentication being part of the app. |\n| Recommendation | **Strongly recommended** as the preferred approach | Legacy approach. Use as a fallback option when you cannot give a service account the required permissions to your Google Ads account. |\n|----------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|"]]