初始设置
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
开发者设置
为云项目启用 API 套件
- 前往 Cloud 控制台:https://console.cloud.google.com/。
- 选择现有云项目或创建新项目。
- 转到
APIs & Services > Enable APIs and Services
。
- 搜索“Chrome”。
- 选择“Chrome Device Token API”。
- 熟悉服务条款。
- 点击
Enable
。
创建凭据
创建服务账号
- 转到
APIs & Services > Credentials > Create Credentials > Service account
。
- 输入服务账号名称,然后点击
Create
。
- 为您的服务帐号创建密钥。点击
Add Key
并创建“json”密钥。请将该文件保存在安全的位置。
- 使用您的服务帐号为客户设置适当的管理员权限:
- 客户可以设置全网域授权,然后服务帐号就可以模拟拥有适当权限的用户/管理员(了解方法)
为客户设置
启用全网域授权
- 以客户管理员的身份,前往管理控制台 (https://admin.google.com/)。
- 前往
Security > Access and data control > API Controls > Domain-wide delegation
。
- 点击
Add new
。
- 输入客户端 ID(“服务账号唯一 ID”)。
- 输入所有必要的 OAuth 范围。
https://www.googleapis.com/auth/chromeosdevicetoken
.
- 点击
Authorize
。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2023-12-01。
[[["易于理解","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"]],["最后更新时间 (UTC):2023-12-01。"],[[["Developers need to enable the Chrome Device Token API and create a service account with a JSON key for authentication."],["Customers, as admin, need to enable domain-wide delegation in their Google Admin console, authorizing the developer's service account with the necessary OAuth scope."],["Developers should familiarize themselves with the API's Terms of Service and customers should ensure the service account has proper admin privileges, potentially through Domain-Wide Delegation for user/admin impersonation."]]],[]]