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

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
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

200

Name Type Description
city string -
city_lat_long string -
country_code string -
country_name string -
state string -

404

Country with given ISO code not found

500

Internal Server Error

GET Logged

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

Used to check if authentication works.

  • cURL
  • Go
  • Ruby
  • JavaScript
  • Python
  • Rust
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

200

OK

500

Internal Server Error