您目前查看的是 Google Photos Library API 的舊版說明文件。
Library API 總覽
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
應用程式可使用 Google Photos Library API,在 Google 相簿中讀取、寫入及分享相片和影片。
Library API 是採用 JSON 酬載的 符合 REST 樣式 API。API 的結構是以 Google 相簿的產品概念為基礎:
- 相片庫:儲存在使用者 Google 相簿帳戶中的媒體。
- 相簿:可與其他使用者分享的媒體集合。
- 媒體項目:相片、影片及其中繼資料。
- 分享:可讓使用者與其他使用者共用媒體的功能。
授權
如同其他 Google REST API,Library API 會使用 OAuth 2.0 來處理授權。應用程式可透過 API 提供的各種授權範圍,要求存取使用者的 Google 相簿相片庫。
請注意,Library API 不支援服務帳戶;使用者必須登入有效的 Google 帳戶,才能使用這個 API。
使用 Library API
開始開發應用程式之前,請注意下列事項:
探索 API
如要在不編寫任何程式碼的情況下試用 Library API,請使用參考說明文件中的 API Explorer。
以下是一些嘗試使用 API Explorer 的方法:
請參閱我們的程式碼範例,瞭解 Library API 的部分重要功能。
合作夥伴計畫
您不必加入合作夥伴計畫,即可與 Google Photos Library API 整合。不過,如果您的應用程式可能會超出正式發布的配額限制,請表達參與 Google 相簿合作夥伴計畫的意願。
瞭解詳情
這裡有幾個地方值得一試:
- 開始使用:設定專案並試用範例。
- 指南:提供 Library API 的使用指南和概念。
- 參考資料:API 參考說明文件
- 支援:尋求協助或提供意見回饋的支援選項。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2024-09-12 (世界標準時間)。
[[["容易理解","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"]],["上次更新時間: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"]]