开始使用
基本设置
如果您使用的是 Lookup API 或 Update API,
您需要拥有 Google 账号、Google Developer Console 项目和 API 密钥。您还需要
激活 Safe Browsing API 以供您的项目使用。
如果您在执行下述步骤时需要其他帮助,请查看
<ph type="x-smartling-placeholder"></ph>
Google API 控制台帮助中心。
1. 创建账号
您需要有 Google 账号才能创建项目。如果您还没有账号,
请在创建您的 Google 账号页面进行注册。
2. 创建项目
您需要有一个 Google Developer Console 项目才能创建 API 密钥。如果您
已有项目,请参阅
<ph type="x-smartling-placeholder"></ph>
创建、关停和恢复项目。
3. 设置 API 密钥
您需要 API 密钥才能访问安全浏览 API。API 密钥可验证您
API 用户,并允许您与 API 进行交互。您将此密钥作为网址参数传入
向安全浏览服务器发送 HTTP 请求例如,将您的 API 密钥替换为
此处显示的是 API_KEY
:
https://safebrowsing.googleapis.com/v4/...?key=API_KEY
如需设置 API 密钥,请参阅
<ph type="x-smartling-placeholder"></ph>
设置 API 密钥。
您的新 API 密钥随即会显示在表格中,请根据需要复制并粘贴此密钥。
4. 激活 API
最后,您需要激活 Safe Browsing API 以用于您的项目。学习内容
操作方法,请参见
<ph type="x-smartling-placeholder"></ph>
启用和停用 API。要启用的 API 称为“安全浏览 API”。
数据库设置
如果您使用的是 Update API,还需要设置本地数据库。
安全浏览功能提供了一个 Go 软件包,供您快速上手。
有关更多信息,请参阅 数据库设置 部分
本地数据库。
使用 API
在开始之前,请阅读我们的服务条款和
价格指南。此外,请查看并确保您了解
安全浏览 API 的使用限制。
若要开始使用安全浏览 API,请参阅以下指南:
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2024-10-11。
[null,null,["最后更新时间 (UTC):2024-10-11。"],[[["To use the Safe Browsing Lookup or Update API, you need a Google Account, a Google Developer Console project, an API key, and activated Safe Browsing APIs."],["Setting up involves creating an account and project, obtaining an API key via the Google Developer Console, and activating the \"Safe Browsing APIs\" for your project."],["The Update API requires a local database setup using provided tools and guidance."],["Before using the APIs, review the Terms of Service, Pricing, and Usage Limits for compliance and understanding."],["Detailed guides are available for utilizing the Lookup API (v4) and Update API (v4)."]]],["To use the Safe Browsing APIs, you need a Google Account, a Developer Console project, and an API key. First, create a Google Account and a Developer Console project. Then, set up an API key for authentication and copy it for use in HTTP requests. Finally, activate the \"Safe Browsing APIs\" for your project. Update API users must also set up a local database, referencing the provided guide. Always review the Terms of Service, Pricing, and Usage Limits.\n"]]