# Method: devices.list

- [HTTP request](https://developers.google.com/photos/ambient/reference/rest/v1/devices/list#body.HTTP_TEMPLATE)
- [Query parameters](https://developers.google.com/photos/ambient/reference/rest/v1/devices/list#body.QUERY_PARAMETERS)
- [Request body](https://developers.google.com/photos/ambient/reference/rest/v1/devices/list#body.request_body)
- [Response body](https://developers.google.com/photos/ambient/reference/rest/v1/devices/list#body.response_body)
  - [JSON representation](https://developers.google.com/photos/ambient/reference/rest/v1/devices/list#body.ListDevicesResponse.SCHEMA_REPRESENTATION)
- [Authorization scopes](https://developers.google.com/photos/ambient/reference/rest/v1/devices/list#body.aspect)
- [Try it!](https://developers.google.com/photos/ambient/reference/rest/v1/devices/list#try-it)

Lists the ambient devices connected to the authenticated user's account. Only returns devices created by the calling application.

### HTTP request

`GET https://photosambient.googleapis.com/v1/devices`

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

### Query parameters

| Parameters ||
|---|---|
| `pageSize` | `integer` Optional. The maximum number of devices to return. The service may return fewer than this value (including zero results). If unspecified or set to 0, at most 50 devices will be 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 `devices.list` call. Provide this to retrieve the subsequent page. |

### Request body

The request body must be empty.

### Response body

A response to the `devices.list` RPC.

If successful, the response body contains data with the following structure:

| JSON representation |
|---|
| ``` { "devices": [ { object (`https://developers.google.com/photos/ambient/reference/rest/v1/devices#AmbientDevice`) } ], "nextPageToken": string } ``` |

| Fields ||
|---|---|
| `devices[]` | ``object (`https://developers.google.com/photos/ambient/reference/rest/v1/devices#AmbientDevice`)`` A page of ambient devices connected to the user's Google Photos account. |
| `nextPageToken` | `string` A token, which can be sent as `pageToken` to retrieve the next page in a `devices.list` request. If this field is omitted, there are no subsequent pages. |

### Authorization scopes

Requires the following OAuth scope:

- `https://www.googleapis.com/auth/photosambient.mediaitems`