# “Me” Endpoints - GET User's last known location

**URL:** <https://community.toggl.com/t/me-endpoints-get-users-last-known-location/165>\
**Category:** API References\
**Tags:** api, parameters, me-endpoint, location, get\
**Created:** [November 21, 2024, 12:27pm UTC](https://community.toggl.com/t/me-endpoints-get-users-last-known-location/165 "2024-11-21T12:27:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Support](https://yyz2.discourse-cdn.com/flex012/user_avatar/community.toggl.com/support/32/1577_2.png) [@Support](https://community.toggl.com/u/Support)\
**Post date:** [November 21, 2024, 12:27pm UTC](https://community.toggl.com/t/me-endpoints-get-users-last-known-location/165/1 "2024-11-21T12:27:27Z")

</div>

```auto
https://api.track.toggl.com/api/v9/me/location

```

Returns the client’s IP-based location. If no data is present, empty response will be yielded.

- cURL
- Go
- Ruby
- JavaScript
- Python
- Rust

```auto
extern crate tokio;extern crate serde_json;use reqwest::{Client};use reqwest::header::{CONTENT_TYPE};#[tokio::main]async fn main() -> Result<(), reqwest::Error> { let client = Client::new(); let json = client.request(Method::GET, "https://api.track.toggl.com/api/v9/me/location".to_string()) .header(CONTENT_TYPE, "application/json") .send() .await? .json() .await?; println!("{:#?}", json); Ok(())}

```

### Response[​](https://engineering.toggl.com/docs/api/me/#response-4)

#### 200[​](https://engineering.toggl.com/docs/api/me/#200-4)

| Name | Type | Description |
| --- | --- | --- |
| city | string | - |
| city\_lat\_long | string | - |
| country\_code | string | - |
| country\_name | string | - |
| state | string | - |

#### 404[​](https://engineering.toggl.com/docs/api/me/#404-1)

Country with given ISO code not found

#### 500[​](https://engineering.toggl.com/docs/api/me/#500-3)

Internal Server Error

## GET Logged[​](https://engineering.toggl.com/docs/api/me/#get-logged)

```auto
https://api.track.toggl.com/api/v9/me/logged

```

Used to check if authentication works.

- cURL
- Go
- Ruby
- JavaScript
- Python
- Rust

```auto
extern crate tokio;extern crate serde_json;use reqwest::{Client};use reqwest::header::{CONTENT_TYPE};#[tokio::main]async fn main() -> Result<(), reqwest::Error> { let client = Client::new(); let json = client.request(Method::GET, "https://api.track.toggl.com/api/v9/me/logged".to_string()) .header(CONTENT_TYPE, "application/json") .send() .await? .json() .await?; println!("{:#?}", json); Ok(())}

```

### Response[​](https://engineering.toggl.com/docs/api/me/#response-5)

#### 200[​](https://engineering.toggl.com/docs/api/me/#200-5)

OK

#### 500[​](https://engineering.toggl.com/docs/api/me/#500-4)

Internal Server Error
