REST Resource: sessions

Resource: PickingSession

Representation of a user session during which the user can pick photos and videos using Google Photos.

JSON representation
{
  "id": string,
  "pickerUri": string,
  "pollingConfig": {
    object (PollingConfig)
  },
  "expireTime": string,
  "mediaItemsSet": boolean
}
Fields
id

string

Output only. The Google-generated identifier for this session.

pickerUri

string

Output only. The URI used to redirect the user to Google Photos (on web) so they can pick photos and videos for the current session.

To view this page successfully, the user must be logged into the Google account that owns this session in their web browser.

The pickerUri cannot be opened in an iframe due to security reasons.

pollingConfig

object (PollingConfig)

Output only. The recommended configuration that applications should use while polling sessions.get.

This field is only populated if media items have not yet been picked for this session (i.e., mediaItemsSet is false).

expireTime

string (Timestamp format)

Output only. Time when access to this session (and its picked media items) will expire.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

mediaItemsSet

boolean

Output only. If set to true, media items have been picked for this session and your application can request the list of picked media items via mediaItems.list.

PollingConfig

Configuration for polling the API.

JSON representation
{
  "pollInterval": string,
  "timeoutIn": string
}
Fields
pollInterval

string (Duration format)

Output only. Recommended time between poll requests.

A duration in seconds with up to nine fractional digits, ending with 's'. Example: "3.5s".

timeoutIn

string (Duration format)

Output only. The length of time after which the client should stop polling.

A value of 0 indicates that the client should stop polling if it hasn't already.

A duration in seconds with up to nine fractional digits, ending with 's'. Example: "3.5s".

Methods

create

Generates a new session during which the user can pick photos and videos for third-party access.

delete

Deletes the specified session.

get

Retrieves information about the specified session.