- HTTP request
- Query parameters
- Request body
- Response body
- Authorization scopes
- MediaItemResult
- Try it!
Returns the list of media items for the specified media item identifiers. Items are returned in the same order as the supplied identifiers.
HTTP request
GET https://photoslibrary.googleapis.com/v1/mediaItems:batchGet
The URL uses gRPC Transcoding syntax.
Query parameters
Parameters | |
---|---|
mediaItemIds[] |
Required. Identifiers of the media items to be requested. Must not contain repeated identifiers and cannot be empty. The maximum number of media items that can be retrieved in one call is 50. |
Request body
The request body must be empty.
Response body
Response to retrieve a list of media items.
If successful, the response body contains data with the following structure:
JSON representation |
---|
{
"mediaItemResults": [
{
object ( |
Fields | |
---|---|
mediaItemResults[] |
Output only. List of media items retrieved. Note that even if the call to mediaItems.batchGet succeeds, there may have been failures for some media items in the batch. These failures are indicated in each |
Authorization scopes
Requires one of the following OAuth scopes:
https://www.googleapis.com/auth/photoslibrary
https://www.googleapis.com/auth/photoslibrary.readonly
https://www.googleapis.com/auth/photoslibrary.readonly.appcreateddata
https://www.googleapis.com/auth/photoslibrary.readonly.originals
MediaItemResult
Result of retrieving a media item.
JSON representation |
---|
{ "status": { object ( |
Fields | |
---|---|
status |
If an error occurred while accessing this media item, this field is populated with information related to the error. For details regarding this field, see |
mediaItem |
Media item retrieved from the user's library. It's populated if no errors occurred and the media item was fetched successfully. |