---
title: "Device location"
method: GET
path: "/v1/devices/{dongleId}/location"
tags: ["devices"]
---

# Device location

`GET /v1/devices/{dongleId}/location`

## Request

- Base URL: `https://api.comma.ai`
- URL: `https://api.comma.ai/v1/devices/{dongleId}/location`
- Auth: HTTP bearer

## Response `200`

JSON object containing device location, or an error message if the location is not known.

- union
  - object
    - `lat` number, required: Latitude, in decimal degrees
    - `lng` number, required: Longitude, in decimal degrees
    - `time` integer, required: Unix timestamp, in milliseconds
    - `accuracy` number, required: Accuracy, in metres
    - `speed` number, required: Speed, in metres per second
    - `bearing` number, required: Direction angle, in degrees from north
    - `dongle_id` string, required: A unique 16-character hexadecimal string. Can represent a device or a user.
  - object
    - `error` 'Location unavailable', required

## Changes

- **2022-12-03** `d13c9189b880`: 1 warning, 1 info
  - added the new `Location unavailable` enum value to the `oneOf[subschema #2]/error` response property for the response status `200`
  - removed `subschema #1` from the `oneOf[subschema #2]/error` response property `oneOf` list for the response status `200`
- **2022-11-27** `5b1478ce801f`: 1 info
  - api tag `devices` added
- **2022-11-27** `04af598547de`: 1 info
  - the endpoint scheme security `AuthUser` was added to the API

[Operation history](https://skmtc.dev/comma/apis/comma-api/changes/v1/devices/:dongleId/location/get.md)

---

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