完成後,您會看到 OAuth 2.0 用戶端 ID 與用戶端密鑰,您可以下載 JSON 格式並儲存供日後使用。
提出要求
AdMob API 是以 HTTP 和 JSON 做為建構基礎,因此任何標準 HTTP 用戶端都可以向這個 API 傳送要求並剖析回應。不過,Google API 用戶端程式庫可以提供更出色的語言整合功能、更高的安全性,並支援需要授權的要求。用戶端程式庫支援多種程式設計語言,只要善加利用,您就不必再手動設定 HTTP 要求及剖析回應。
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["缺少我需要的資訊","missingTheInformationINeed","thumb-down"],["過於複雜/步驟過多","tooComplicatedTooManySteps","thumb-down"],["過時","outOfDate","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["示例/程式碼問題","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2024-11-08 (世界標準時間)。"],[[["This guide helps developers programmatically access AdMob account data using the AdMob API, requiring OAuth2 authorization for secure interactions."],["Before starting, ensure you have a Google Account, an AdMob account, and familiarity with REST basics and OAuth 2.0 authorization."],["Choose the appropriate authentication type (Desktop or Web app) based on your app's needs and authorization process."],["Create or select a Google API project and enable the AdMob API to get started, then generate OAuth2 credentials for authorization."],["Make your first API request using provided code examples (Java, PHP, Python, or curl) and manage token revocation for security."]]],["To use the AdMob API, developers must authorize requests via OAuth2. Key actions include creating a project in the Google API Console and enabling the AdMob API. Developers then generate OAuth2 credentials, choosing between desktop or web app authentication types. The OAuth consent screen must be configured. Finally, with created credentials and specifying the scope (`admob.readonly` or `admob.report`), developers can use HTTP or Google API client libraries to make their first API request and start retrieving AdMob data. Shared tokens can be revoked.\n"]]