> For the complete documentation index, see [llms.txt](https://docs.quantumbyte.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.quantumbyte.ai/home/quantumbyte-v2.0/3.microsites-1/9.sdk/7.location/1.current.md).

# Lokasi Terkini

Mendapatkan lokasi terkini pengguna

Nama function yang digunakan adalah

```ts
GetLocation()
```

### Contoh

Berikut ini merupakan contoh dalam penggunaan

```js
import { InaLib } from "ina-digital-sdk";
const inaLib = new InaLib({ mode: 'prod', secret_key: '{your_secret_key}' })
inaLib.GetLocation()
		.then(function (response) {
			console.log(response);
		})
		.catch(function (error) {
			console.log(error);
		});
```

Maka output yang akan keluar adalah

```json
[object GeolocationPosition] {
  "coords": [object GeolocationCoordinates] {
    "accuracy": 14.322,
    "altitude": null,
    "altitudeAccuracy": null,
    "heading": null,
    "latitude": -6.276771,
    "longitude": 106.9733794,
    "speed": null
  },
  "timestamp": 1709635831376
}
```
