您正在查看 Google Photos Library API 的旧版文档。
Library API 概览
借助 Google Photos Library API,您的应用可以读取、写入和分享 Google 相册中的照片和视频。
Library API 是一种带有 JSON 载荷的 RESTful API。此 API 的结构基于 Google 相册的产品概念:
- 媒体库:存储在用户 Google 相册帐号中的媒体内容。
- 影集:可与其他用户共享的媒体集合。
- 媒体内容:照片、视频及其元数据。
- 分享:让用户能够与其他用户分享媒体内容的功能。
授权
与其他 Google REST API 一样,Library API 使用 OAuth 2.0 来处理授权。您的应用可以通过该 API 提供的各种授权范围来请求访问用户的 Google 相册媒体库。
请注意,Library API 不支持服务帐号;如需使用此 API,用户必须登录有效的 Google 帐号。
使用 Library API
在开始开发应用之前,请注意以下几点:
探索 API
如需在不编写任何代码的情况下试用 Library API,请使用参考文档中提供的 API Explorer。
下面是尝试使用 API Explorer 的一些方法:
请查看我们的代码示例,了解 Library API 的一些关键功能。
合作伙伴计划
您无需加入合作伙伴计划,即可与 Google Photos Library API 集成。
但是,如果您的应用有可能超出正式发布的配额限制,欢迎您加入 Google 相册合作伙伴计划。
了解详情
您可以参考以下内容:
- 开始使用:配置您的项目并试用示例。
- 指南:有关使用 Library API 的方法指南和概念。
- 参考:API 参考文档
- 支持:用于请求帮助或提供反馈的支持选项。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2024-09-12。
[null,null,["最后更新时间 (UTC):2024-09-12。"],[[["The Google Photos Library API allows your app to read, write, and share photos and videos stored in Google Photos."],["It uses a RESTful API with JSON payload and OAuth 2.0 for authorization, requiring users to be signed in to a Google Account."],["Before developing your app, review the acceptable use policy, UX guidelines, and API limits and quotas."],["Explore the API through the API Explorer or by checking out the provided code samples."],["Consider joining the Google Photos partner program if your app is likely to exceed the general availability quota limit."]]],["The Google Photos Library API enables apps to interact with Google Photos content, reading, writing, and sharing photos and videos. It's a RESTful API using JSON payloads, organized around libraries, albums, media items, and sharing. Access requires OAuth 2.0 authorization via specific scopes, and service accounts are not supported. Developers should adhere to usage policies, UX guidelines, and quotas. The API can be explored through the API Explorer, and code samples are available. Those who need more quota should apply to the Google Photos partner program.\n"]]