Method: devices.list

  • This API endpoint lists ambient devices connected to a user's account, specifically those created by the calling application.

  • The HTTP request uses a GET method with the URL https://photosambient.googleapis.com/v1/devices.

  • Optional query parameters pageSize (for the number of devices) and pageToken (for pagination) can be included in the request.

  • The request body must be empty, and the successful response body will include an array of devices and a nextPageToken for subsequent pages, if available.

  • Authorization requires the OAuth scope https://www.googleapis.com/auth/photosambient.mediaitems.

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 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 (AmbientDevice)
    }
  ],
  "nextPageToken": string
}
Fields
devices[]

object (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