Đánh dấu một album là được chia sẻ và người dùng khác có thể truy cập. Bạn chỉ có thể thực hiện thao tác này trên các album do nhà phát triển tạo qua API.
Yêu cầu HTTP
POST https://photoslibrary.googleapis.com/v1/albums/{albumId}:share
[null,null,["Cập nhật lần gần đây nhất: 2024-11-07 UTC."],[[["This method shares an existing album, making it accessible to others, but only for albums created via the API."],["The album is shared by sending a POST request to a specific URL, including the album's ID in the path."],["Request and response bodies utilize JSON format to provide and retrieve information about the shared album and its settings."],["The method requires specific authorization using the `https://www.googleapis.com/auth/photoslibrary.sharing` scope."],["This method will be deprecated starting March 31, 2025, and developers should consult the Photos APIs updates for alternatives."]]],["This document outlines the process for sharing an album via the Google Photos API, which will be deprecated after March 31, 2025. It details using a `POST` request to `https://photoslibrary.googleapis.com/v1/albums/{albumId}:share`, including the required `albumId` path parameter and a request body with `sharedAlbumOptions`. The API call needs the `https://www.googleapis.com/auth/photoslibrary.sharing` authorization scope. A successful response returns a `shareInfo` object. This only applies to albums the developer created.\n"]]