我们目前正在将一部分报告类型从离线报告迁移到即时报告。用户迁移后,
queries.list
响应将包含现有的即时报告。如需了解详情,请参阅我们的
博文。
向请求授权
当您的应用请求私有数据时,该请求必须获得经过身份验证的
有权访问相应数据的用户。
<ph type="x-smartling-placeholder">
您的应用向 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。(如果 API 未在
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 和
客户端密钥)。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2024-08-22。
[null,null,["最后更新时间 (UTC):2024-08-22。"],[[["Applications need authorization from an authenticated user to access private data through the Bid Manager API."],["The Bid Manager API exclusively supports OAuth 2.0 for authorization and requires apps to pass an OAuth verification review."],["Apps must be registered using the Google API Console, undergo an OAuth verification review, and request specific scopes for data access."],["Upon user consent, Google provides a short-lived access token which the app uses to make authorized requests for user data."]]],["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"]]