# Method: mediaItems.list

- [HTTP request](https://developers.google.com/photos/picker/reference/rest/v1/mediaItems/list#body.HTTP_TEMPLATE)
- [Query parameters](https://developers.google.com/photos/picker/reference/rest/v1/mediaItems/list#body.QUERY_PARAMETERS)
- [Request body](https://developers.google.com/photos/picker/reference/rest/v1/mediaItems/list#body.request_body)
- [Response body](https://developers.google.com/photos/picker/reference/rest/v1/mediaItems/list#body.response_body)
  - [JSON representation](https://developers.google.com/photos/picker/reference/rest/v1/mediaItems/list#body.ListMediaItemsResponse.SCHEMA_REPRESENTATION)
- [Authorization scopes](https://developers.google.com/photos/picker/reference/rest/v1/mediaItems/list#body.aspect)

Returns a list of media items picked by the user during the specified session.

A `FAILED_PRECONDITION` error is returned if the user has not yet finished picking media items for the specified session. In this scenario, your application should poll `sessions.get` until the session is ready before retrying this method.

### HTTP request

`GET https://photospicker.googleapis.com/v1/mediaItems`

The URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.

### Query parameters

| Parameters ||
|---|---|
| `sessionId` | `string` Required. The Google-generated identifier for this session. |
| `pageSize` | `integer` Optional. The maximum number of media items to return. The service may return fewer than this value (including zero results). If unspecified or set to 0, at most 50 media items is returned. The maximum value is 100; values above 100 will be coerced to 100. Negative values will result in an `INVALID_ARGUMENT` error. |
| `pageToken` | `string` Optional. A page token, received from a previous `mediaItems.list` call. Provide this to retrieve the subsequent page. |

### 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 (`https://developers.google.com/photos/picker/reference/rest/v1/mediaItems#PickedMediaItem`) } ], "nextPageToken": string } ``` |

| Fields ||
|---|---|
| `mediaItems[]` | ``object (`https://developers.google.com/photos/picker/reference/rest/v1/mediaItems#PickedMediaItem`)`` A page of picked media items. |
| `nextPageToken` | `string` If set, this field can be used as the `pageToken` in a subsequent `mediaItems.list` call to retrieve the next page of picked media items. If this field is omitted, there are no subsequent pages. |

### Authorization scopes

Requires the following OAuth scope:

- `https://www.googleapis.com/auth/photospicker.mediaitems.readonly`