Learn about the new Picker API and important Library API changes.
Details here.
Method: sessions.create
Stay organized with collections
Save and categorize content based on your preferences.
Generates a new session during which the user can pick photos and videos for third-party access.
If the user doesn't have an active Google Photos account, a FAILED_PRECONDITION
error is returned.
If the client application creates too many sessions per user, a RESOURCE_EXHAUSTED
error is returned. Clients are unlikely to reach these limits under normal circumstances. However, clients are still recommended to call sessions.delete
after each session, to proactively stay within resource limits.
HTTP request
POST https://photospicker.googleapis.com/v1/sessions
The URL uses gRPC Transcoding syntax.
Request body
The request body contains an instance of PickingSession
.
Response body
If successful, the response body contains a newly created instance of PickingSession
.
Authorization scopes
Requires the following OAuth scope:
https://www.googleapis.com/auth/photospicker.mediaitems.readonly
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-10-09 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-10-09 UTC."],[[["This endpoint creates a session for users to select photos and videos for third-party access."],["A `FAILED_PRECONDITION` error occurs if the user lacks an active Google Photos account."],["Excessive session creation leads to a `RESOURCE_EXHAUSTED` error, though unlikely under normal use."],["Clients should call `sessions.delete` after each session to avoid exceeding resource limits."],["Requires the `https://www.googleapis.com/auth/photospicker.mediaitems.readonly` OAuth scope for authorization."]]],[]]