Page Summary
-
This endpoint retrieves a list of ambient media items for a specified device from user-configured media sources.
-
The HTTP request is a
GETmethod tohttps://photosambient.googleapis.com/v1/mediaItems, requiring adeviceIdquery parameter. -
Requests are limited to 240 per device per day, and a
FAILED_PRECONDITIONerror occurs if no media sources are selected for the device. -
The request body must be empty, and the response body includes a list of
mediaItemsand anextPageTokenfor pagination. -
Authorization requires the
https://www.googleapis.com/auth/photosambient.mediaitemsOAuth scope.
Returns a list of ambient media items from user-configured media sources for the specified device.
By default, listMediaItems provides the Ambient experience, returning a curated set of media items from all user-configured sources.
Optionally, you can include mediaSourceId in the request to retrieve a paginated list of items from a specific media source, allowing for more traditional filtering.
Client applications are limited to 240 requests per device per day.
A FAILED_PRECONDITION error occurs if the user has not configured any media sources.
HTTP request
GET https://photosambient.googleapis.com/v1/mediaItems
The URL uses gRPC Transcoding syntax.
Query parameters
| Parameters | |
|---|---|
deviceId |
Required. The unique identifier for this device. |
mediaSourceId |
Optional. For the Ambient experience, omit this field. This will return a curated set of media items from all configured sources. The number of items returned will honor your The Note, |
pageSize |
Optional. The maximum number of media items to return. The service will honor your If |
pageToken |
Optional. A page token, received from a previous |
Request body
The request body must be empty.
Response body
Response to the mediaItems.list method.
If successful, the response body contains data with the following structure:
| JSON representation |
|---|
{
"mediaItems": [
{
object ( |
| Fields | |
|---|---|
mediaItems[] |
A page of ambient media items for the device to display. |
nextPageToken |
If set, this field can be used as the If this field is omitted, it is not necessarily an indication that no more content is available to be fetched, but rather that the subsequent page of content may contain media items that were already returned in prior pages. |
Authorization scopes
Requires the following OAuth scope:
https://www.googleapis.com/auth/photosambient.mediaitems