Retrieve Installed App & Location Details
After completing the OAuth flow, your app now has an installed_app_id from the token response. This section covers how to use your installed_app_id to retrieve the location associated with the installation and the location's details.
Get Installed App​
The installed_app_id from the OAuth token response identifies this particular installation of your app. Retrieve its details to find the locationId, which you may need for subsequent API calls to get information about the location.
To retrieve the locationId for an installation, always query the Installed App endpoint (GET /v1/installedapps/{installedAppId}) rather than listing all locations via the /locations endpoint. Fetching the ID from the Installed App avoids the need to request the r:locations:* OAuth scope. Requesting this scope unnecessarily violates the principle of least privilege by exposing sensitive user data, such as physical latitude and longitude, which can cause users to abandon the authorization flow.
Request​
GET https://api.smartthings.com/v1/installedapps/{installedAppId} HTTP/1.1
Content-Type: application/json;charset=utf-8
Accept: application/json
Authorization: Bearer {access_token}
Response​
HTTP/1.1 200 OK
Content-Type: application/json
{
"installedAppId": "b4c71ab2-116d-4d79-9125-b1909fa9b0c7",
"installedAppType": "API_ONLY",
"installedAppStatus": "AUTHORIZED",
"displayName": "Scratch API Subscription Example",
"appId": "02ef84da-984e-43a6-b7cc-905c88183e9e",
"referenceId": null,
"locationId": "95efee9b-6073-4871-b5ba-de6642187293",
"owner": {
"ownerType": "USER",
"ownerId": "c257d2c7-332b-d60d-808d-550bfbd54556"
},
"notices": [],
"createdDate": "2026-03-12T16:30:04Z",
"lastUpdatedDate": "2026-03-12T16:30:05Z",
"classifications": [
"CONNECTED_SERVICE"
],
"principalType": "LOCATION",
"restrictionTier": 0,
"singleInstance": true
}
Key Fields​
| Field | Description |
|---|---|
installedAppId | Unique identifier for this app installation |
installedAppType | API_ONLY for OAuth API Access apps |
installedAppStatus | AUTHORIZED indicates the app has valid credentials |
displayName | The app's display name as registered |
appId | The identifier of the registered app definition |
locationId | The SmartThings location this app is installed into -- use this for device and subscription calls |
owner | The user who authorized the app |
singleInstance | Whether only one instance of this app is allowed per location |
Get Location​
Use the locationId from the installed app response to retrieve details about the SmartThings location, such as its name and timezone.
Request​
GET https://api.smartthings.com/v1/locations/{locationId} HTTP/1.1
Content-Type: application/json;charset=utf-8
Accept: application/json
Authorization: Bearer {access_token}
Response​
HTTP/1.1 200 OK
Content-Type: application/json
{
"locationId": "95efee9b-6073-4871-b5ba-de6642187293",
"name": "Hubless Test",
"countryCode": "USA",
"latitude": 32.30061019,
"longitude": -95.89011618,
"regionRadius": 250,
"temperatureScale": "F",
"timeZoneId": "America/Chicago",
"locale": "en",
"parent": {
"type": "ACCOUNT",
"id": "6a0532ef-4d5e-4d01-a25c-8eb67297d62b"
}
}
Key Fields​
| Field | Description |
|---|---|
locationId | Unique identifier for the location |
name | End-user assigned name for the location (e.g. "Home", "Office") |
countryCode | Country code for the location |
temperatureScale | F (Fahrenheit) or C (Celsius) |
timeZoneId | IANA timezone identifier |
locale | Language locale |
Up Next​
With location info, you can now subscribe to device events and list devices in that location.