1 kwietnia 2025 r. usunięto niektóre zakresy interfejsu Library API.
Więcej informacji
Method: albums.create
Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
Tworzy album w bibliotece Zdjęć Google użytkownika.
Żądanie HTTP
POST https://photoslibrary.googleapis.com/v1/albums
Adres URL używa składni transkodowania gRPC.
Treść żądania
Treść żądania zawiera dane o następującej strukturze:
Zapis JSON |
{
"album": {
object (Album )
}
} |
Pola |
album |
object (Album )
Wymagane. Album, który ma zostać utworzony.
|
Treść odpowiedzi
Jeśli operacja się powiedzie, treść odpowiedzi będzie zawierała nowo utworzoną instancję Album
.
Zakresy autoryzacji
Wymaga jednego z tych zakresów OAuth:
https://www.googleapis.com/auth/photoslibrary.appendonly
O ile nie stwierdzono inaczej, treść tej strony jest objęta licencją Creative Commons – uznanie autorstwa 4.0, a fragmenty kodu są dostępne na licencji Apache 2.0. Szczegółowe informacje na ten temat zawierają zasady dotyczące witryny Google Developers. Java jest zastrzeżonym znakiem towarowym firmy Oracle i jej podmiotów stowarzyszonych.
Ostatnia aktualizacja: 2025-04-01 UTC.
[[["Łatwo zrozumieć","easyToUnderstand","thumb-up"],["Rozwiązało to mój problem","solvedMyProblem","thumb-up"],["Inne","otherUp","thumb-up"]],[["Brak potrzebnych mi informacji","missingTheInformationINeed","thumb-down"],["Zbyt skomplikowane / zbyt wiele czynności do wykonania","tooComplicatedTooManySteps","thumb-down"],["Nieaktualne treści","outOfDate","thumb-down"],["Problem z tłumaczeniem","translationIssue","thumb-down"],["Problem z przykładami/kodem","samplesCodeIssue","thumb-down"],["Inne","otherDown","thumb-down"]],["Ostatnia aktualizacja: 2025-04-01 UTC."],[[["This documentation outlines the process for creating an album in a user's Google Photos library using the Photos Library API."],["The API request involves sending a POST request to a specific endpoint with a JSON body containing the album details."],["A successful response will return the newly created album object, including its properties and metadata."],["Authentication requires one of the provided OAuth scopes to grant necessary permissions."],["Beginning March 31, 2025, the scopes will change to limit functionality to media items created by the user's application, as outlined in the Photos APIs updates document."]]],["This document details creating albums in a user's Google Photos library via the API. It uses a `POST` request to `https://photoslibrary.googleapis.com/v1/albums`. The request body, formatted as JSON, requires an `album` object. Successful requests return the newly created `Album` instance. Authorization necessitates specific OAuth scopes: `photoslibrary`, `photoslibrary.appendonly`, or `photoslibrary.sharing`. Note that scopes will limit interactions with media items, created by the app, after March 31, 2025.\n"]]