---
title: "List Locations"
method: GET
path: "/locations"
tags: ["Locations"]
---

# List Locations

`GET /locations`

## Request

- Base URL: `https://api.smartthings.com/v1`
- URL: `https://api.smartthings.com/v1/locations`
- Auth: OAuth 2
  - Implicit: `https://auth-global.api.smartthings.com`
  - Scopes: `r:locations:*`, `l:locations`
- TypeScript: <https://skmtc.dev/smartthings/apis/smartthings-api/docs/locations/get.ts> (a function with typed inputs; its response is checked against the schema)

List all Locations currently accessible to the requester.  (Possibly paginated.)

## Query parameters

- `allowed` string
- `limit` integer
- `page` string

## Response `200`

An array of Locations

- PagedLocations: Represents a single page of Locations available in a user account.
  - `items` PagedLocation[], required
    - `locationId` string, uuid, required: The ID of the location.
    - `name` string, required: A name given for the location (eg. Home)
    - `allowed` string[]: List of client-facing action identifiers that are currently permitted for the user. If the value of this property is not null, then any action not included in the list value of the property is currently prohibited for the user. If the value of this property is null (or absent), then no permission-related information is being provided. <ul> <li> w:locations - the user can change the name of the location <li> d:locations - the user can delete the location <li> w:grants:locationshare - the user can share the location with other users <li> w:devices - the user can create devices on the location <li> w:locations:geo - the user can edit the geo-coordinates of the location <li> r:installedapps - the user can view or list installed apps on the location <li> w:installedapps - the user can create installed apps on the location <li> r:modes - the user can view or list Modes on the location <li> r:rooms - the user can view or list rooms on the location <li> w:rooms - the user can create rooms on the location <li> r:locations:currentmode - the user can view the current Mode on the location <li> w:locations:currentmode - the user can change the current Mode on the location <li> r:scenes - the user can view or list scenes on the location <li> w:scenes - the user can create scenes on the location <li> r:rules - the user can view or list rules on the location <li> w:rules - the user can create rules on the location <li> r:linkedplaces - the user can view or list linked places on the location <li> w:linkedplaces - the user can create linked places on the location <li> r:hubmanager - the user can launch the hub manager <li> w:hubmanager - the user can edit the hub manager <li> r:cameras:clips - the user can view video clips associated with camera devices on the location <li> w:cameras:clips - the user can record video clips associated with camera devices on the location </ul>
    - `parent` LocationParent, required: The parent of a Location. Intended to be used only in MFU contexts.
      - `type` 'LOCATIONGROUP' | 'ACCOUNT': The type of the Location's parent.
      - `id` string, ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$: The ID of the parent
  - `_links` Links
    - `next` Link
      - `href` string: An absolute URL linking to a resource.
    - `previous` Link
      - `href` string: An absolute URL linking to a resource.

## Other responses

- `401`: Unauthorized
- `403`: Forbidden. E.g., if the location does not exist.
- `429`: Too many requests
- `default`: Unexpected error

## Changes

- **2022-12-19** `adcacfc2749d`: 1 info
  - added the new optional `query` request parameter `allowed`

[Operation history](https://skmtc.dev/smartthings/apis/smartthings-api/changes/locations/get.md)

---

[API](https://skmtc.dev/smartthings/apis/smartthings-api.md) - [All operations](https://skmtc.dev/smartthings/apis/smartthings-api/llms.txt) - [OpenAPI document](https://skmtc.dev/smartthings/apis/smartthings-api/revisions/2788a4236800?raw)
