對要求進行授權
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
當應用程式要求私人資料時,該要求必須取得經過驗證的授權
擁有存取資料的使用者。
您的應用程式傳送至 Bid Manager API 的每項要求都必須包含授權權杖。權杖
也能讓 Google 識別您的應用程式
關於授權通訊協定
您的應用程式必須使用 OAuth 2.0 授權要求。
系統不支援其他授權通訊協定。如果您的應用程式使用 Google 登入功能,系統會針對
您。
使用 OAuth 2.0 對要求進行授權
所有傳送至 Bid Manager API 的要求都必須獲得已驗證使用者的授權。
授權程序 (或稱「流程」) 的細節OAuth 2.0
處理應用程式以下一般程序適用於所有應用程式類型:
- 建立應用程式後,請透過 Google API 控制台註冊應用程式。接著,Google 會提供您所需的資訊
例如用戶端 ID 和用戶端密碼
- 提交 OAuth 驗證
審查要求,以便存取 Bid Manager API 範圍。
- 在 Google API 控制台中啟用 Bid Manager API。(如果
,然後略過這個步驟)。
- 當應用程式需要存取使用者資料時,會向 Google 要求特定的範圍
資源存取權
- Google 會向使用者顯示同意畫面,要求他們授權您的應用程式
存取部分個人資料
- 如果使用者同意,Google 會提供一個短期的存取權杖給您的應用程式。
- 您的應用程式會要求使用者資料,並將存取權杖附加至要求。
- 如果 Google 判定您的要求與權杖有效,就會傳回您要求的資料。
部分流程包含額外步驟,例如使用更新權杖來取得新的存取權
符記如要進一步瞭解各種應用程式類型的流程,請參閱 Google 的 OAuth 2.0 說明文件。
OAuth 範圍
以下是 Bid Manager API 的 OAuth 2.0 範圍資訊:
範圍 |
意義 |
https://www.googleapis.com/auth/doubleclickbidmanager |
讀取/寫入權限。 |
如要透過 OAuth 2.0 要求存取權,您的應用程式還需要範圍資訊
Google 在您註冊應用程式時提供的資訊 (例如用戶端 ID 和
用戶端密鑰)。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-07-25 (世界標準時間)。
[[["容易理解","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"]],["上次更新時間:2025-07-25 (世界標準時間)。"],[[["\u003cp\u003eApplications need authorization from an authenticated user to access private data through the Bid Manager API.\u003c/p\u003e\n"],["\u003cp\u003eThe Bid Manager API exclusively supports OAuth 2.0 for authorization and requires apps to pass an OAuth verification review.\u003c/p\u003e\n"],["\u003cp\u003eApps must be registered using the Google API Console, undergo an OAuth verification review, and request specific scopes for data access.\u003c/p\u003e\n"],["\u003cp\u003eUpon user consent, Google provides a short-lived access token which the app uses to make authorized requests for user data.\u003c/p\u003e\n"]]],["Apps requesting private data through the Bid Manager API must be authorized by an authenticated user via OAuth 2.0. The process involves registering the app with Google, submitting an OAuth verification request, and activating the API. The app then requests a specific access scope, prompting a user consent screen. Upon approval, Google issues a short-lived access token. This token is included in data requests, allowing Google to validate the request and return data. The available scope is for read/write access.\n"],null,["# Authorize Requests\n\nWhen your app requests private data, the request must be authorized by an authenticated\nuser who has access to that data.\n| **Note:** If your app accesses the Bid Manager API, it must pass the [OAuth verification review](//support.google.com/cloud/answer/7454865#verification). If you see **unverified app** on the screen when testing your app, you must submit a verification request to remove it. Learn more about [unverified apps](//support.google.com/cloud/answer/7454865) or get answers to [frequently asked questions about app\n| verification](//support.google.com/cloud/answer/9110914).\n\nEvery request your app sends to the Bid Manager API must include an authorization token. The token\nalso identifies your app to Google.\n\nAbout authorization protocols\n-----------------------------\n\nYour app must use [OAuth 2.0](/identity/protocols/OAuth2) to authorize requests.\nNo other authorization protocols are supported. If your app uses [Google Sign-In](/identity#google-sign-in), some aspects of authorization are handled for\nyou.\n\nAuthorizing requests with OAuth 2.0\n-----------------------------------\n\nAll requests to the Bid Manager API must be authorized by an authenticated user.\n\nThe details of the authorization process, or \"flow,\" for OAuth 2.0 vary somewhat depending\non what kind of app you're writing. The following general process applies to all app types:\n\n1. When you create your app, you register it using the [Google API Console](https://console.cloud.google.com/). Google then provides information you'll need later, such as a client ID and a client secret.\n2. Submit an [OAuth verification\n review](//support.google.com/cloud/answer/7454865#verification) request for your app in order to access the Bid Manager API scope.\n3. Activate the Bid Manager API in the Google API Console. (If the API isn't listed in the API Console, then skip this step.)\n4. When your app needs access to user data, it asks Google for a particular **scope** of access.\n5. Google displays a **consent screen** to the user, asking them to authorize your app for access to some of their data.\n6. If the user approves, then Google gives your app a short-lived **access token**.\n7. Your app requests user data, attaching the access token to the request.\n8. If Google determines that your request and the token are valid, it returns the requested data.\n\nSome flows include additional steps, such as using **refresh tokens** to acquire new access\ntokens. For detailed information about flows for various types of apps, see Google's [OAuth 2.0 documentation](/identity/protocols/OAuth2).\n\nOAuth scope\n-----------\n\nHere's the OAuth 2.0 scope information for the Bid Manager API:\n\n| Scope | Meaning |\n|---------------------------------------------------------|--------------------|\n| `https://www.googleapis.com/auth/doubleclickbidmanager` | Read/write access. |\n\nTo request access using OAuth 2.0, your app needs the scope information, as well as\ninformation that Google supplies when you register your app (such as the client ID and the\nclient secret)."]]