Me
GET Me​
https://api.track.toggl.com/api/v9/me
Returns details for the current user.
- cURL
- Go
- Ruby
- JavaScript
- Python
- Rust
curl https://api.track.toggl.com/api/v9/me \
-H "Content-Type: application/json" \
-u <email>:<password>
req, err := http.NewRequest(http.MethodGet,
"https://api.track.toggl.com/api/v9/me")
if err != nil {
print(err)
}
req.Header.Set("Content-Type", "application/json; charset=utf-8")
req.SetBasicAuth("<email>", "<password>")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
print(err)
}
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
print(err)
}
fmt.Print(string(body))
require 'net/http'
require 'uri'
require 'json'
uri = URI('https://api.track.toggl.com/api/v9/me')
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Get.new(uri.path)
req['Content-Type'] = "application/json"
request.basic_auth '<email>', '<password>'
res = http.request(req)
puts JSON.parse(res.body)
fetch("https://api.track.toggl.com/api/v9/me", {
method: "GET",
headers: {
"Content-Type": "application/json",
"Authorization": `Basic ${base64.encode(<email>:<password>)}`
},
})
.then((resp) => resp.json())
.then((json) => {
console.log(json);
})
.catch(err => console.error(err));
import requests
from base64 import b64encode
data = requests.get('https://api.track.toggl.com/api/v9/me', headers={'content-type': 'application/json', 'Authorization' : 'Basic %s' % b64encode(b"<email>:<password>").decode("ascii")})
print(data.json())
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().basic_auth("<email>", "<password>");
let json = client.request(Method::GET, "https://api.track.toggl.com/api/v9/me".to_string())
.header(CONTENT_TYPE, "application/json")
.send()
.await?
.json()
.await?;
println!("{:#?}", json);
Ok(())
}
Parameters​
Query​
name | type | required | description |
---|---|---|---|
with_related_data | boolean | false | Retrieve user related data (clients, projects, tasks, tags, workspaces, time entries, etc.) |
Response​
200​
name | type | description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
api_token | string | will be omitted if empty | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
at | string | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
beginning_of_week | integer | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
clients | Array of
| Clients, null if with_related_data was not set to true or if the user does not have any clients | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
country_id | integer | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
created_at | string | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
default_workspace_id | integer | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
string | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
fullname | string | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
has_password | boolean | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
id | integer | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
image_url | string | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
intercom_hash | string | will be omitted if empty | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
oauth_providers | Array of string | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
openid_email | string | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
openid_enabled | boolean | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
options |
| will be omitted if empty | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
projects | Array of
| Projects, null if with_related_data was not set to true or if the user does not have any projects | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
tags | Array of
| Tags, null if with_related_data was not set to true, or if the user does not have any tags | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
tasks | Array of
| Tasks, null if with_related_data was not set to true or if the user does not have any tasks | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
time_entries | Array of
| TimeEntries, null if with_related_data was not set to true or if the user does not have any time entries | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
timezone | string | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
updated_at | string | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
workspaces | Array of
| Workspaces, null if with_related_data was not set to true or if the user does not have any workspaces |
403​
User does not have access to this resource.
404​
could not load user data
500​
Internal Server Error
PUT Me​
https://api.track.toggl.com/api/v9/me
Updates details for the current user.
- cURL
- Go
- Ruby
- JavaScript
- Python
- Rust
curl -X PUT https://api.track.toggl.com/api/v9/me \
-H "Content-Type: application/json" \
-d '{"beginning_of_week":"integer","country_id":"integer","current_password":"string","default_workspace_id":"integer","email":"string","fullname":"string","password":"string","timezone":"string"}' \
-u <email>:<password>
bytes, err := json.Marshal('{"beginning_of_week":"integer","country_id":"integer","current_password":"string","default_workspace_id":"integer","email":"string","fullname":"string","password":"string","timezone":"string"}')
if err != nil {
print(err)
}
req, err := http.NewRequest(http.MethodPut,
"https://api.track.toggl.com/api/v9/me", bytes.NewBuffer(bytes))
if err != nil {
print(err)
}
req.Header.Set("Content-Type", "application/json; charset=utf-8")
req.SetBasicAuth("<email>", "<password>")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
print(err)
}
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
print(err)
}
fmt.Print(string(body))
require 'net/http'
require 'uri'
require 'json'
uri = URI('https://api.track.toggl.com/api/v9/me')
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Put.new(uri.path)
req['Content-Type'] = "application/json"
req.body = {"beginning_of_week":"integer","country_id":"integer","current_password":"string","default_workspace_id":"integer","email":"string","fullname":"string","password":"string","timezone":"string"}.to_json
request.basic_auth '<email>', '<password>'
res = http.request(req)
puts JSON.parse(res.body)
fetch("https://api.track.toggl.com/api/v9/me", {
method: "PUT",
body: {"beginning_of_week":"integer","country_id":"integer","current_password":"string","default_workspace_id":"integer","email":"string","fullname":"string","password":"string","timezone":"string"},
headers: {
"Content-Type": "application/json",
"Authorization": `Basic ${base64.encode(<email>:<password>)}`
},
})
.then((resp) => resp.json())
.then((json) => {
console.log(json);
})
.catch(err => console.error(err));
import requests
from base64 import b64encode
data = requests.put('https://api.track.toggl.com/api/v9/me', json='{"beginning_of_week":"integer","country_id":"integer","current_password":"string","default_workspace_id":"integer","email":"string","fullname":"string","password":"string","timezone":"string"}', headers={'content-type': 'application/json', 'Authorization' : 'Basic %s' % b64encode(b"<email>:<password>").decode("ascii")})
print(data.json())
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().basic_auth("<email>", "<password>");
let json = client.request(Method::PUT, "https://api.track.toggl.com/api/v9/me".to_string())
.json(&serde_json::json!({"beginning_of_week":"integer","country_id":"integer","current_password":"string","default_workspace_id":"integer","email":"string","fullname":"string","password":"string","timezone":"string"}))
.header(CONTENT_TYPE, "application/json")
.send()
.await?
.json()
.await?;
println!("{:#?}", json);
Ok(())
}
Parameters​
Body​
name | type | description |
---|---|---|
beginning_of_week | integer | User's first day of the week. Sunday: 0, Monday:1, etc. |
country_id | integer | User's country ID |
current_password | string | User's current password (used to change the current password) |
default_workspace_id | integer | User's default workspace ID |
string | User's email address | |
fullname | string | User's full name |
password | string | User's new password (current one must also be provided) |
timezone | string | User's timezone |
Response​
200​
name | type | description | ||||||
---|---|---|---|---|---|---|---|---|
api_token | string | will be omitted if empty | ||||||
at | string | - | ||||||
beginning_of_week | integer | - | ||||||
country_id | integer | - | ||||||
created_at | string | - | ||||||
default_workspace_id | integer | - | ||||||
string | - | |||||||
fullname | string | - | ||||||
has_password | boolean | - | ||||||
id | integer | - | ||||||
image_url | string | - | ||||||
openid_email | string | - | ||||||
openid_enabled | boolean | - | ||||||
options |
| will be omitted if empty | ||||||
timezone | string | - | ||||||
updated_at | string | - |
400​
Possible error messages:
* Current password is not valid
* Current password must be present to change password
* Invalid beginning_of_week
* Invalid country_id
* Invalid default_workspace_id
* Invalid email
* Invalid fullname
* Invalid timezone
* Password should be at least 6 characters
* user with this email already exists
403​
User does not have access to this resource.
GET Clients​
https://api.track.toggl.com/api/v9/me/clients
Get Clients.
- cURL
- Go
- Ruby
- JavaScript
- Python
- Rust
curl https://api.track.toggl.com/api/v9/me/clients \
-H "Content-Type: application/json" \
-u <email>:<password>
req, err := http.NewRequest(http.MethodGet,
"https://api.track.toggl.com/api/v9/me/clients")
if err != nil {
print(err)
}
req.Header.Set("Content-Type", "application/json; charset=utf-8")
req.SetBasicAuth("<email>", "<password>")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
print(err)
}
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
print(err)
}
fmt.Print(string(body))
require 'net/http'
require 'uri'
require 'json'
uri = URI('https://api.track.toggl.com/api/v9/me/clients')
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Get.new(uri.path)
req['Content-Type'] = "application/json"
request.basic_auth '<email>', '<password>'
res = http.request(req)
puts JSON.parse(res.body)
fetch("https://api.track.toggl.com/api/v9/me/clients", {
method: "GET",
headers: {
"Content-Type": "application/json",
"Authorization": `Basic ${base64.encode(<email>:<password>)}`
},
})
.then((resp) => resp.json())
.then((json) => {
console.log(json);
})
.catch(err => console.error(err));
import requests
from base64 import b64encode
data = requests.get('https://api.track.toggl.com/api/v9/me/clients', headers={'content-type': 'application/json', 'Authorization' : 'Basic %s' % b64encode(b"<email>:<password>").decode("ascii")})
print(data.json())
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().basic_auth("<email>", "<password>");
let json = client.request(Method::GET, "https://api.track.toggl.com/api/v9/me/clients".to_string())
.header(CONTENT_TYPE, "application/json")
.send()
.await?
.json()
.await?;
println!("{:#?}", json);
Ok(())
}
Parameters​
Query​
name | type | required | description |
---|---|---|---|
since | integer | false | Retrieve clients created/modified/deleted since this date using UNIX timestamp. |
Response​
200​
Array of:
name | type | description |
---|---|---|
archived | boolean | IsArchived is true if the client is archived |
at | string | When was the last update |
id | integer | Client ID |
name | string | Name of the client |
server_deleted_at | string | When was deleted, null if not deleted |
wid | integer | Workspace ID |
500​
Internal Server Error
POST CloseAccount​
https://api.track.toggl.com/api/v9/me/close_account
Close Account
- cURL
- Go
- Ruby
- JavaScript
- Python
- Rust
curl -X POST https://api.track.toggl.com/api/v9/me/close_account \
-H "Content-Type: application/json" \
-u <email>:<password>
req, err := http.NewRequest(http.MethodPost,
"https://api.track.toggl.com/api/v9/me/close_account")
if err != nil {
print(err)
}
req.Header.Set("Content-Type", "application/json; charset=utf-8")
req.SetBasicAuth("<email>", "<password>")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
print(err)
}
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
print(err)
}
fmt.Print(string(body))
require 'net/http'
require 'uri'
require 'json'
uri = URI('https://api.track.toggl.com/api/v9/me/close_account')
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Post.new(uri.path)
req['Content-Type'] = "application/json"
request.basic_auth '<email>', '<password>'
res = http.request(req)
puts JSON.parse(res.body)
fetch("https://api.track.toggl.com/api/v9/me/close_account", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Authorization": `Basic ${base64.encode(<email>:<password>)}`
},
})
.then((resp) => resp.json())
.then((json) => {
console.log(json);
})
.catch(err => console.error(err));
import requests
from base64 import b64encode
data = requests.post('https://api.track.toggl.com/api/v9/me/close_account', headers={'content-type': 'application/json', 'Authorization' : 'Basic %s' % b64encode(b"<email>:<password>").decode("ascii")})
print(data.json())
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().basic_auth("<email>", "<password>");
let json = client.request(Method::POST, "https://api.track.toggl.com/api/v9/me/close_account".to_string())
.header(CONTENT_TYPE, "application/json")
.send()
.await?
.json()
.await?;
println!("{:#?}", json);
Ok(())
}
Response​
200​
Successful operation.
500​
Internal Server Error
GET Features​
https://api.track.toggl.com/api/v9/me/features
Get features.
- cURL
- Go
- Ruby
- JavaScript
- Python
- Rust
curl https://api.track.toggl.com/api/v9/me/features \
-H "Content-Type: application/json" \
-u <email>:<password>
req, err := http.NewRequest(http.MethodGet,
"https://api.track.toggl.com/api/v9/me/features")
if err != nil {
print(err)
}
req.Header.Set("Content-Type", "application/json; charset=utf-8")
req.SetBasicAuth("<email>", "<password>")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
print(err)
}
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
print(err)
}
fmt.Print(string(body))
require 'net/http'
require 'uri'
require 'json'
uri = URI('https://api.track.toggl.com/api/v9/me/features')
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Get.new(uri.path)
req['Content-Type'] = "application/json"
request.basic_auth '<email>', '<password>'
res = http.request(req)
puts JSON.parse(res.body)
fetch("https://api.track.toggl.com/api/v9/me/features", {
method: "GET",
headers: {
"Content-Type": "application/json",
"Authorization": `Basic ${base64.encode(<email>:<password>)}`
},
})
.then((resp) => resp.json())
.then((json) => {
console.log(json);
})
.catch(err => console.error(err));
import requests
from base64 import b64encode
data = requests.get('https://api.track.toggl.com/api/v9/me/features', headers={'content-type': 'application/json', 'Authorization' : 'Basic %s' % b64encode(b"<email>:<password>").decode("ascii")})
print(data.json())
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().basic_auth("<email>", "<password>");
let json = client.request(Method::GET, "https://api.track.toggl.com/api/v9/me/features".to_string())
.header(CONTENT_TYPE, "application/json")
.send()
.await?
.json()
.await?;
println!("{:#?}", json);
Ok(())
}
Response​
200​
Array of:
name | type | description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
features | Array of
| - | ||||||||||||
workspace_id | integer | - |
403​
Operation Forbidden
500​
Internal Server Error
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
curl https://api.track.toggl.com/api/v9/me/location \
-H "Content-Type: application/json"
req, err := http.NewRequest(http.MethodGet,
"https://api.track.toggl.com/api/v9/me/location")
if err != nil {
print(err)
}
req.Header.Set("Content-Type", "application/json; charset=utf-8")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
print(err)
}
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
print(err)
}
fmt.Print(string(body))
require 'net/http'
require 'uri'
require 'json'
uri = URI('https://api.track.toggl.com/api/v9/me/location')
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Get.new(uri.path)
req['Content-Type'] = "application/json"
res = http.request(req)
puts JSON.parse(res.body)
fetch("https://api.track.toggl.com/api/v9/me/location", {
method: "GET",
headers: {
"Content-Type": "application/json"
},
})
.then((resp) => resp.json())
.then((json) => {
console.log(json);
})
.catch(err => console.error(err));
import requests
from base64 import b64encode
data = requests.get('https://api.track.toggl.com/api/v9/me/location', headers={'content-type': 'application/json'})
print(data.json())
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
curl https://api.track.toggl.com/api/v9/me/logged \
-H "Content-Type: application/json"
req, err := http.NewRequest(http.MethodGet,
"https://api.track.toggl.com/api/v9/me/logged")
if err != nil {
print(err)
}
req.Header.Set("Content-Type", "application/json; charset=utf-8")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
print(err)
}
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
print(err)
}
fmt.Print(string(body))
require 'net/http'
require 'uri'
require 'json'
uri = URI('https://api.track.toggl.com/api/v9/me/logged')
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Get.new(uri.path)
req['Content-Type'] = "application/json"
res = http.request(req)
puts JSON.parse(res.body)
fetch("https://api.track.toggl.com/api/v9/me/logged", {
method: "GET",
headers: {
"Content-Type": "application/json"
},
})
.then((resp) => resp.json())
.then((json) => {
console.log(json);
})
.catch(err => console.error(err));
import requests
from base64 import b64encode
data = requests.get('https://api.track.toggl.com/api/v9/me/logged', headers={'content-type': 'application/json'})
print(data.json())
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​
500​
Internal Server Error
GET LostPassword​
https://api.track.toggl.com/api/v9/me/lost_passwords
Verifies the user request to reset the password.
- cURL
- Go
- Ruby
- JavaScript
- Python
- Rust
curl https://api.track.toggl.com/api/v9/me/lost_passwords \
-H "Content-Type: application/json"
req, err := http.NewRequest(http.MethodGet,
"https://api.track.toggl.com/api/v9/me/lost_passwords")
if err != nil {
print(err)
}
req.Header.Set("Content-Type", "application/json; charset=utf-8")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
print(err)
}
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
print(err)
}
fmt.Print(string(body))
require 'net/http'
require 'uri'
require 'json'
uri = URI('https://api.track.toggl.com/api/v9/me/lost_passwords')
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Get.new(uri.path)
req['Content-Type'] = "application/json"
res = http.request(req)
puts JSON.parse(res.body)
fetch("https://api.track.toggl.com/api/v9/me/lost_passwords", {
method: "GET",
headers: {
"Content-Type": "application/json"
},
})
.then((resp) => resp.json())
.then((json) => {
console.log(json);
})
.catch(err => console.error(err));
import requests
from base64 import b64encode
data = requests.get('https://api.track.toggl.com/api/v9/me/lost_passwords', headers={'content-type': 'application/json'})
print(data.json())
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/lost_passwords".to_string())
.header(CONTENT_TYPE, "application/json")
.send()
.await?
.json()
.await?;
println!("{:#?}", json);
Ok(())
}
Response​
200​
Successful operation
500​
Internal Server Error
POST LostPassword​
https://api.track.toggl.com/api/v9/me/lost_passwords
Handles the users request to reset the password.
- cURL
- Go
- Ruby
- JavaScript
- Python
- Rust
curl -X POST https://api.track.toggl.com/api/v9/me/lost_passwords \
-H "Content-Type: application/json" \
-d '{"email":"string"}'
bytes, err := json.Marshal('{"email":"string"}')
if err != nil {
print(err)
}
req, err := http.NewRequest(http.MethodPost,
"https://api.track.toggl.com/api/v9/me/lost_passwords", bytes.NewBuffer(bytes))
if err != nil {
print(err)
}
req.Header.Set("Content-Type", "application/json; charset=utf-8")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
print(err)
}
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
print(err)
}
fmt.Print(string(body))
require 'net/http'
require 'uri'
require 'json'
uri = URI('https://api.track.toggl.com/api/v9/me/lost_passwords')
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Post.new(uri.path)
req['Content-Type'] = "application/json"
req.body = {"email":"string"}.to_json
res = http.request(req)
puts JSON.parse(res.body)
fetch("https://api.track.toggl.com/api/v9/me/lost_passwords", {
method: "POST",
body: {"email":"string"},
headers: {
"Content-Type": "application/json"
},
})
.then((resp) => resp.json())
.then((json) => {
console.log(json);
})
.catch(err => console.error(err));
import requests
from base64 import b64encode
data = requests.post('https://api.track.toggl.com/api/v9/me/lost_passwords', json='{"email":"string"}', headers={'content-type': 'application/json'})
print(data.json())
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::POST, "https://api.track.toggl.com/api/v9/me/lost_passwords".to_string())
.json(&serde_json::json!({"email":"string"}))
.header(CONTENT_TYPE, "application/json")
.send()
.await?
.json()
.await?;
println!("{:#?}", json);
Ok(())
}
Parameters​
Body​
name | type | description |
---|---|---|
string | Email of user requesting password reset |
Response​
200​
Successful operation
500​
Internal Server Error
POST LostPassword conformation​
https://api.track.toggl.com/api/v9/me/lost_passwords/confirm
Handles lost password request confirmation.
- cURL
- Go
- Ruby
- JavaScript
- Python
- Rust
curl -X POST https://api.track.toggl.com/api/v9/me/lost_passwords/confirm \
-H "Content-Type: application/json" \
-d '{"code":"string","password":"string","user_id":"integer"}'
bytes, err := json.Marshal('{"code":"string","password":"string","user_id":"integer"}')
if err != nil {
print(err)
}
req, err := http.NewRequest(http.MethodPost,
"https://api.track.toggl.com/api/v9/me/lost_passwords/confirm", bytes.NewBuffer(bytes))
if err != nil {
print(err)
}
req.Header.Set("Content-Type", "application/json; charset=utf-8")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
print(err)
}
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
print(err)
}
fmt.Print(string(body))
require 'net/http'
require 'uri'
require 'json'
uri = URI('https://api.track.toggl.com/api/v9/me/lost_passwords/confirm')
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Post.new(uri.path)
req['Content-Type'] = "application/json"
req.body = {"code":"string","password":"string","user_id":"integer"}.to_json
res = http.request(req)
puts JSON.parse(res.body)
fetch("https://api.track.toggl.com/api/v9/me/lost_passwords/confirm", {
method: "POST",
body: {"code":"string","password":"string","user_id":"integer"},
headers: {
"Content-Type": "application/json"
},
})
.then((resp) => resp.json())
.then((json) => {
console.log(json);
})
.catch(err => console.error(err));
import requests
from base64 import b64encode
data = requests.post('https://api.track.toggl.com/api/v9/me/lost_passwords/confirm', json='{"code":"string","password":"string","user_id":"integer"}', headers={'content-type': 'application/json'})
print(data.json())
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::POST, "https://api.track.toggl.com/api/v9/me/lost_passwords/confirm".to_string())
.json(&serde_json::json!({"code":"string","password":"string","user_id":"integer"}))
.header(CONTENT_TYPE, "application/json")
.send()
.await?
.json()
.await?;
println!("{:#?}", json);
Ok(())
}
Parameters​
Body​
name | type | description |
---|---|---|
code | string | Temporary token to reset password |
password | string | User's new password |
user_id | integer | User's ID |
Response​
200​
Successful operation
500​
Internal Server Error
GET Organizations that a user is part of​
https://api.track.toggl.com/api/v9/me/organizations
Get all organizations a given user is part of.
- cURL
- Go
- Ruby
- JavaScript
- Python
- Rust
curl https://api.track.toggl.com/api/v9/me/organizations \
-H "Content-Type: application/json"
req, err := http.NewRequest(http.MethodGet,
"https://api.track.toggl.com/api/v9/me/organizations")
if err != nil {
print(err)
}
req.Header.Set("Content-Type", "application/json; charset=utf-8")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
print(err)
}
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
print(err)
}
fmt.Print(string(body))
require 'net/http'
require 'uri'
require 'json'
uri = URI('https://api.track.toggl.com/api/v9/me/organizations')
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Get.new(uri.path)
req['Content-Type'] = "application/json"
res = http.request(req)
puts JSON.parse(res.body)
fetch("https://api.track.toggl.com/api/v9/me/organizations", {
method: "GET",
headers: {
"Content-Type": "application/json"
},
})
.then((resp) => resp.json())
.then((json) => {
console.log(json);
})
.catch(err => console.error(err));
import requests
from base64 import b64encode
data = requests.get('https://api.track.toggl.com/api/v9/me/organizations', headers={'content-type': 'application/json'})
print(data.json())
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/organizations".to_string())
.header(CONTENT_TYPE, "application/json")
.send()
.await?
.json()
.await?;
println!("{:#?}", json);
Ok(())
}
Response​
200​
Array of:
name | type | description | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
admin | boolean | Whether the requester is an admin of the organization | ||||||||||||||||||
at | string | Organization's last modification date | ||||||||||||||||||
created_at | string | Organization's creation date | ||||||||||||||||||
id | integer | Organization ID | ||||||||||||||||||
is_multi_workspace_enabled | boolean | Is true when the organization option is_multi_workspace_enabled is set | ||||||||||||||||||
is_unified | boolean | - | ||||||||||||||||||
max_data_retention_days | integer | How far back free workspaces in this org can access data. | ||||||||||||||||||
max_workspaces | integer | Maximum number of workspaces allowed for the organization | ||||||||||||||||||
name | string | Organization Name | ||||||||||||||||||
owner | boolean | Whether the requester is a the owner of the organization | ||||||||||||||||||
payment_methods | string | Organization's subscription payment methods. Omitted if empty. | ||||||||||||||||||
pricing_plan_id | integer | Organization plan ID | ||||||||||||||||||
server_deleted_at | string | null | Organization's delete date | ||||||||||||||||||
suspended_at | string | Whether the organization is currently suspended | ||||||||||||||||||
trial_info |
| - | ||||||||||||||||||
user_count | integer | Number of organization users |
500​
Internal Server Error
GET Projects​
https://api.track.toggl.com/api/v9/me/projects
Get projects
- cURL
- Go
- Ruby
- JavaScript
- Python
- Rust
curl https://api.track.toggl.com/api/v9/me/projects \
-H "Content-Type: application/json" \
-u <email>:<password>
req, err := http.NewRequest(http.MethodGet,
"https://api.track.toggl.com/api/v9/me/projects")
if err != nil {
print(err)
}
req.Header.Set("Content-Type", "application/json; charset=utf-8")
req.SetBasicAuth("<email>", "<password>")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
print(err)
}
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
print(err)
}
fmt.Print(string(body))
require 'net/http'
require 'uri'
require 'json'
uri = URI('https://api.track.toggl.com/api/v9/me/projects')
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Get.new(uri.path)
req['Content-Type'] = "application/json"
request.basic_auth '<email>', '<password>'
res = http.request(req)
puts JSON.parse(res.body)
fetch("https://api.track.toggl.com/api/v9/me/projects", {
method: "GET",
headers: {
"Content-Type": "application/json",
"Authorization": `Basic ${base64.encode(<email>:<password>)}`
},
})
.then((resp) => resp.json())
.then((json) => {
console.log(json);
})
.catch(err => console.error(err));
import requests
from base64 import b64encode
data = requests.get('https://api.track.toggl.com/api/v9/me/projects', headers={'content-type': 'application/json', 'Authorization' : 'Basic %s' % b64encode(b"<email>:<password>").decode("ascii")})
print(data.json())
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().basic_auth("<email>", "<password>");
let json = client.request(Method::GET, "https://api.track.toggl.com/api/v9/me/projects".to_string())
.header(CONTENT_TYPE, "application/json")
.send()
.await?
.json()
.await?;
println!("{:#?}", json);
Ok(())
}
Parameters​
Query​
name | type | required | description |
---|---|---|---|
include_archived | string | false | Include archived projects. |
since | integer | false | Retrieve projects modified since this date using UNIX timestamp, including deleted ones. |
Response​
200​
Array of:
name | type | description | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
active | boolean | Whether the project is active or archived | |||||||||||||||||||||
actual_hours | integer | null | Actual hours | |||||||||||||||||||||
actual_seconds | integer | null | Actual seconds | |||||||||||||||||||||
at | string | Last updated date | |||||||||||||||||||||
auto_estimates | boolean | null | Whether estimates are based on task hours, premium feature | |||||||||||||||||||||
billable | boolean | null | Whether the project is billable, premium feature | |||||||||||||||||||||
cid | integer | Client ID legacy field | |||||||||||||||||||||
client_id | integer | null | Client ID | |||||||||||||||||||||
color | string | Color | |||||||||||||||||||||
created_at | string | Creation date | |||||||||||||||||||||
currency | string | null | Currency, premium feature | |||||||||||||||||||||
current_period |
| Current project period, premium feature | |||||||||||||||||||||
end_date | string | End date | |||||||||||||||||||||
estimated_hours | integer | null | Estimated hours | |||||||||||||||||||||
estimated_seconds | integer | null | Estimated seconds | |||||||||||||||||||||
first_time_entry | string | First time entry for this project. Only included if it was requested with with_first_time_entry | |||||||||||||||||||||
fixed_fee | number | Fixed fee, premium feature | |||||||||||||||||||||
id | integer | Project ID | |||||||||||||||||||||
is_private | boolean | Whether the project is private | |||||||||||||||||||||
name | string | Name | |||||||||||||||||||||
rate | number | Hourly rate | |||||||||||||||||||||
rate_last_updated | string | null | Last date for rate change | |||||||||||||||||||||
recurring | boolean | Whether the project is recurring, premium feature | |||||||||||||||||||||
recurring_parameters | Array of
| Project recurring parameters, premium feature | |||||||||||||||||||||
server_deleted_at | string | null | Deletion date | |||||||||||||||||||||
start_date | string | Start date | |||||||||||||||||||||
template | boolean | null | Whether the project is used as template, premium feature | |||||||||||||||||||||
wid | integer | - | |||||||||||||||||||||
workspace_id | integer | Workspace ID |
400​
Invalid include_archived
403​
Operation Forbidden
500​
Internal Server Error
GET ProjectsPaginated​
https://api.track.toggl.com/api/v9/me/projects/paginated
Get paginated projects.
- cURL
- Go
- Ruby
- JavaScript
- Python
- Rust
curl https://api.track.toggl.com/api/v9/me/projects/paginated \
-H "Content-Type: application/json" \
-u <email>:<password>
req, err := http.NewRequest(http.MethodGet,
"https://api.track.toggl.com/api/v9/me/projects/paginated")
if err != nil {
print(err)
}
req.Header.Set("Content-Type", "application/json; charset=utf-8")
req.SetBasicAuth("<email>", "<password>")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
print(err)
}
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
print(err)
}
fmt.Print(string(body))
require 'net/http'
require 'uri'
require 'json'
uri = URI('https://api.track.toggl.com/api/v9/me/projects/paginated')
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Get.new(uri.path)
req['Content-Type'] = "application/json"
request.basic_auth '<email>', '<password>'
res = http.request(req)
puts JSON.parse(res.body)
fetch("https://api.track.toggl.com/api/v9/me/projects/paginated", {
method: "GET",
headers: {
"Content-Type": "application/json",
"Authorization": `Basic ${base64.encode(<email>:<password>)}`
},
})
.then((resp) => resp.json())
.then((json) => {
console.log(json);
})
.catch(err => console.error(err));
import requests
from base64 import b64encode
data = requests.get('https://api.track.toggl.com/api/v9/me/projects/paginated', headers={'content-type': 'application/json', 'Authorization' : 'Basic %s' % b64encode(b"<email>:<password>").decode("ascii")})
print(data.json())
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().basic_auth("<email>", "<password>");
let json = client.request(Method::GET, "https://api.track.toggl.com/api/v9/me/projects/paginated".to_string())
.header(CONTENT_TYPE, "application/json")
.send()
.await?
.json()
.await?;
println!("{:#?}", json);
Ok(())
}
Parameters​
Query​
name | type | required | description |
---|---|---|---|
start_project_id | integer | false | Project ID to resume the next pagination from. |
since | integer | false | Retrieve projects created/modified/deleted since this date using UNIX timestamp. |
per_page | integer | false | Number of records per page. |
Response​
200​
Array of:
name | type | description | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
active | boolean | Whether the project is active or archived | |||||||||||||||||||||
actual_hours | integer | null | Actual hours | |||||||||||||||||||||
actual_seconds | integer | null | Actual seconds | |||||||||||||||||||||
at | string | Last updated date | |||||||||||||||||||||
auto_estimates | boolean | null | Whether estimates are based on task hours, premium feature | |||||||||||||||||||||
billable | boolean | null | Whether the project is billable, premium feature | |||||||||||||||||||||
cid | integer | Client ID legacy field | |||||||||||||||||||||
client_id | integer | null | Client ID | |||||||||||||||||||||
color | string | Color | |||||||||||||||||||||
created_at | string | Creation date | |||||||||||||||||||||
currency | string | null | Currency, premium feature | |||||||||||||||||||||
current_period |
| Current project period, premium feature | |||||||||||||||||||||
end_date | string | End date | |||||||||||||||||||||
estimated_hours | integer | null | Estimated hours | |||||||||||||||||||||
estimated_seconds | integer | null | Estimated seconds | |||||||||||||||||||||
first_time_entry | string | First time entry for this project. Only included if it was requested with with_first_time_entry | |||||||||||||||||||||
fixed_fee | number | Fixed fee, premium feature | |||||||||||||||||||||
id | integer | Project ID | |||||||||||||||||||||
is_private | boolean | Whether the project is private | |||||||||||||||||||||
name | string | Name | |||||||||||||||||||||
rate | number | Hourly rate | |||||||||||||||||||||
rate_last_updated | string | null | Last date for rate change | |||||||||||||||||||||
recurring | boolean | Whether the project is recurring, premium feature | |||||||||||||||||||||
recurring_parameters | Array of
| Project recurring parameters, premium feature | |||||||||||||||||||||
server_deleted_at | string | null | Deletion date | |||||||||||||||||||||
start_date | string | Start date | |||||||||||||||||||||
template | boolean | null | Whether the project is used as template, premium feature | |||||||||||||||||||||
wid | integer | - | |||||||||||||||||||||
workspace_id | integer | Workspace ID |
403​
Operation Forbidden
500​
Internal Server Error
GET Tags​
https://api.track.toggl.com/api/v9/me/tags
Returns tags for the current user.
- cURL
- Go
- Ruby
- JavaScript
- Python
- Rust
curl https://api.track.toggl.com/api/v9/me/tags \
-H "Content-Type: application/json" \
-u <email>:<password>
req, err := http.NewRequest(http.MethodGet,
"https://api.track.toggl.com/api/v9/me/tags")
if err != nil {
print(err)
}
req.Header.Set("Content-Type", "application/json; charset=utf-8")
req.SetBasicAuth("<email>", "<password>")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
print(err)
}
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
print(err)
}
fmt.Print(string(body))
require 'net/http'
require 'uri'
require 'json'
uri = URI('https://api.track.toggl.com/api/v9/me/tags')
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Get.new(uri.path)
req['Content-Type'] = "application/json"
request.basic_auth '<email>', '<password>'
res = http.request(req)
puts JSON.parse(res.body)
fetch("https://api.track.toggl.com/api/v9/me/tags", {
method: "GET",
headers: {
"Content-Type": "application/json",
"Authorization": `Basic ${base64.encode(<email>:<password>)}`
},
})
.then((resp) => resp.json())
.then((json) => {
console.log(json);
})
.catch(err => console.error(err));
import requests
from base64 import b64encode
data = requests.get('https://api.track.toggl.com/api/v9/me/tags', headers={'content-type': 'application/json', 'Authorization' : 'Basic %s' % b64encode(b"<email>:<password>").decode("ascii")})
print(data.json())
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().basic_auth("<email>", "<password>");
let json = client.request(Method::GET, "https://api.track.toggl.com/api/v9/me/tags".to_string())
.header(CONTENT_TYPE, "application/json")
.send()
.await?
.json()
.await?;
println!("{:#?}", json);
Ok(())
}
Parameters​
Query​
name | type | required | description |
---|---|---|---|
since | integer | false | Retrieve tags modified/deleted since this date using UNIX timestamp. |
Response​
200​
Array of:
name | type | description |
---|---|---|
at | string | When was created/last modified |
deleted_at | string | When was deleted |
id | integer | Tag ID |
name | string | Tag name |
workspace_id | integer | Workspace ID |
403​
User does not have access to this resource.
500​
Internal Server Error
GET Tasks​
https://api.track.toggl.com/api/v9/me/tasks
Returns tasks from projects in which the user is participating.
- cURL
- Go
- Ruby
- JavaScript
- Python
- Rust
curl https://api.track.toggl.com/api/v9/me/tasks \
-H "Content-Type: application/json" \
-u <email>:<password>
req, err := http.NewRequest(http.MethodGet,
"https://api.track.toggl.com/api/v9/me/tasks")
if err != nil {
print(err)
}
req.Header.Set("Content-Type", "application/json; charset=utf-8")
req.SetBasicAuth("<email>", "<password>")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
print(err)
}
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
print(err)
}
fmt.Print(string(body))
require 'net/http'
require 'uri'
require 'json'
uri = URI('https://api.track.toggl.com/api/v9/me/tasks')
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Get.new(uri.path)
req['Content-Type'] = "application/json"
request.basic_auth '<email>', '<password>'
res = http.request(req)
puts JSON.parse(res.body)
fetch("https://api.track.toggl.com/api/v9/me/tasks", {
method: "GET",
headers: {
"Content-Type": "application/json",
"Authorization": `Basic ${base64.encode(<email>:<password>)}`
},
})
.then((resp) => resp.json())
.then((json) => {
console.log(json);
})
.catch(err => console.error(err));
import requests
from base64 import b64encode
data = requests.get('https://api.track.toggl.com/api/v9/me/tasks', headers={'content-type': 'application/json', 'Authorization' : 'Basic %s' % b64encode(b"<email>:<password>").decode("ascii")})
print(data.json())
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().basic_auth("<email>", "<password>");
let json = client.request(Method::GET, "https://api.track.toggl.com/api/v9/me/tasks".to_string())
.header(CONTENT_TYPE, "application/json")
.send()
.await?
.json()
.await?;
println!("{:#?}", json);
Ok(())
}
Parameters​
Query​
name | type | required | description |
---|---|---|---|
since | integer | false | Retrieve tasks created/modified/deleted since this date using UNIX timestamp. |
include_not_active | string | false | Include tasks marked as done. |
Response​
200​
Array of:
name | type | description |
---|---|---|
active | boolean | False when the task has been done |
at | string | When the task was created/last modified |
estimated_seconds | integer | null | Estimation time for this task in seconds |
id | integer | Task ID |
name | string | Task Name |
project_id | integer | Project ID |
recurring | boolean | Whether this is a recurring task |
server_deleted_at | string | null | When the task was deleted |
tracked_seconds | integer | The value tracked_seconds is in milliseconds, not in seconds. |
user_id | integer | null | Task assignee, if available |
workspace_id | integer | Workspace ID |
400​
Invalid include_not_active
403​
User does not have access to this resource.
500​
Internal Server Error
GET TrackReminders​
https://api.track.toggl.com/api/v9/me/track_reminders
Returns a list of track reminders.
- cURL
- Go
- Ruby
- JavaScript
- Python
- Rust
curl https://api.track.toggl.com/api/v9/me/track_reminders \
-H "Content-Type: application/json" \
-u <email>:<password>
req, err := http.NewRequest(http.MethodGet,
"https://api.track.toggl.com/api/v9/me/track_reminders")
if err != nil {
print(err)
}
req.Header.Set("Content-Type", "application/json; charset=utf-8")
req.SetBasicAuth("<email>", "<password>")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
print(err)
}
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
print(err)
}
fmt.Print(string(body))
require 'net/http'
require 'uri'
require 'json'
uri = URI('https://api.track.toggl.com/api/v9/me/track_reminders')
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Get.new(uri.path)
req['Content-Type'] = "application/json"
request.basic_auth '<email>', '<password>'
res = http.request(req)
puts JSON.parse(res.body)
fetch("https://api.track.toggl.com/api/v9/me/track_reminders", {
method: "GET",
headers: {
"Content-Type": "application/json",
"Authorization": `Basic ${base64.encode(<email>:<password>)}`
},
})
.then((resp) => resp.json())
.then((json) => {
console.log(json);
})
.catch(err => console.error(err));
import requests
from base64 import b64encode
data = requests.get('https://api.track.toggl.com/api/v9/me/track_reminders', headers={'content-type': 'application/json', 'Authorization' : 'Basic %s' % b64encode(b"<email>:<password>").decode("ascii")})
print(data.json())
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().basic_auth("<email>", "<password>");
let json = client.request(Method::GET, "https://api.track.toggl.com/api/v9/me/track_reminders".to_string())
.header(CONTENT_TYPE, "application/json")
.send()
.await?
.json()
.await?;
println!("{:#?}", json);
Ok(())
}
Response​
200​
Returns a list of track reminders.
Array of:
name | type | description |
---|---|---|
created_at | string | Reminder creation time |
frequency | integer | Frequency of the reminder in days, should be either 1 or 7 |
group_ids | Array of integer | Groups IDs to send the reminder to |
reminder_id | integer | Reminder ID |
threshold | integer | Threshold is the number of hours after which the reminder will be sent |
user_ids | Array of integer | User IDs to send the reminder to |
workspace_id | integer | Workspace ID |
403​
User does not have access to this resource.
500​
Internal Server Error
GET WebTimer​
https://api.track.toggl.com/api/v9/me/web-timer
Get web timer.
- cURL
- Go
- Ruby
- JavaScript
- Python
- Rust
curl https://api.track.toggl.com/api/v9/me/web-timer \
-H "Content-Type: application/json" \
-u <email>:<password>
req, err := http.NewRequest(http.MethodGet,
"https://api.track.toggl.com/api/v9/me/web-timer")
if err != nil {
print(err)
}
req.Header.Set("Content-Type", "application/json; charset=utf-8")
req.SetBasicAuth("<email>", "<password>")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
print(err)
}
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
print(err)
}
fmt.Print(string(body))
require 'net/http'
require 'uri'
require 'json'
uri = URI('https://api.track.toggl.com/api/v9/me/web-timer')
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Get.new(uri.path)
req['Content-Type'] = "application/json"
request.basic_auth '<email>', '<password>'
res = http.request(req)
puts JSON.parse(res.body)
fetch("https://api.track.toggl.com/api/v9/me/web-timer", {
method: "GET",
headers: {
"Content-Type": "application/json",
"Authorization": `Basic ${base64.encode(<email>:<password>)}`
},
})
.then((resp) => resp.json())
.then((json) => {
console.log(json);
})
.catch(err => console.error(err));
import requests
from base64 import b64encode
data = requests.get('https://api.track.toggl.com/api/v9/me/web-timer', headers={'content-type': 'application/json', 'Authorization' : 'Basic %s' % b64encode(b"<email>:<password>").decode("ascii")})
print(data.json())
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().basic_auth("<email>", "<password>");
let json = client.request(Method::GET, "https://api.track.toggl.com/api/v9/me/web-timer".to_string())
.header(CONTENT_TYPE, "application/json")
.send()
.await?
.json()
.await?;
println!("{:#?}", json);
Ok(())
}
Response​
200​
Successful operation
403​
Operation Forbidden
404​
Resource can not be found
500​
Internal Server Error
GET Workspaces​
https://api.track.toggl.com/api/v9/me/workspaces
Lists workspaces for given user.
- cURL
- Go
- Ruby
- JavaScript
- Python
- Rust
curl https://api.track.toggl.com/api/v9/me/workspaces \
-H "Content-Type: application/json" \
-u <email>:<password>
req, err := http.NewRequest(http.MethodGet,
"https://api.track.toggl.com/api/v9/me/workspaces")
if err != nil {
print(err)
}
req.Header.Set("Content-Type", "application/json; charset=utf-8")
req.SetBasicAuth("<email>", "<password>")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
print(err)
}
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
print(err)
}
fmt.Print(string(body))
require 'net/http'
require 'uri'
require 'json'
uri = URI('https://api.track.toggl.com/api/v9/me/workspaces')
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Get.new(uri.path)
req['Content-Type'] = "application/json"
request.basic_auth '<email>', '<password>'
res = http.request(req)
puts JSON.parse(res.body)
fetch("https://api.track.toggl.com/api/v9/me/workspaces", {
method: "GET",
headers: {
"Content-Type": "application/json",
"Authorization": `Basic ${base64.encode(<email>:<password>)}`
},
})
.then((resp) => resp.json())
.then((json) => {
console.log(json);
})
.catch(err => console.error(err));
import requests
from base64 import b64encode
data = requests.get('https://api.track.toggl.com/api/v9/me/workspaces', headers={'content-type': 'application/json', 'Authorization' : 'Basic %s' % b64encode(b"<email>:<password>").decode("ascii")})
print(data.json())
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().basic_auth("<email>", "<password>");
let json = client.request(Method::GET, "https://api.track.toggl.com/api/v9/me/workspaces".to_string())
.header(CONTENT_TYPE, "application/json")
.send()
.await?
.json()
.await?;
println!("{:#?}", json);
Ok(())
}
Parameters​
Query​
name | type | required | description |
---|---|---|---|
since | integer | false | Retrieve workspaces created/modified/deleted since this date using UNIX timestamp, including the dates a workspace member got added, removed or updated in the workspace. |
Response​
200​
Array of:
name | type | description | |||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
admin | boolean | - | |||||||||||||||||||||||||||||||||||||||||||||||||||
api_token | string | - | |||||||||||||||||||||||||||||||||||||||||||||||||||
at | string | - | |||||||||||||||||||||||||||||||||||||||||||||||||||
business_ws | boolean | - | |||||||||||||||||||||||||||||||||||||||||||||||||||
csv_upload |
| - | |||||||||||||||||||||||||||||||||||||||||||||||||||
default_currency | string | - | |||||||||||||||||||||||||||||||||||||||||||||||||||
default_hourly_rate | number | - | |||||||||||||||||||||||||||||||||||||||||||||||||||
ical_enabled | boolean | - | |||||||||||||||||||||||||||||||||||||||||||||||||||
ical_url | string | - | |||||||||||||||||||||||||||||||||||||||||||||||||||
id | integer | - | |||||||||||||||||||||||||||||||||||||||||||||||||||
logo_url | string | - | |||||||||||||||||||||||||||||||||||||||||||||||||||
max_data_retention_days | integer | How far back free workspaces can access data. | |||||||||||||||||||||||||||||||||||||||||||||||||||
name | string | - | |||||||||||||||||||||||||||||||||||||||||||||||||||
only_admins_may_create_projects | boolean | - | |||||||||||||||||||||||||||||||||||||||||||||||||||
only_admins_may_create_tags | boolean | - | |||||||||||||||||||||||||||||||||||||||||||||||||||
only_admins_see_billable_rates | boolean | - | |||||||||||||||||||||||||||||||||||||||||||||||||||
only_admins_see_team_dashboard | boolean | - | |||||||||||||||||||||||||||||||||||||||||||||||||||
organization_id | integer | - | |||||||||||||||||||||||||||||||||||||||||||||||||||
premium | boolean | - | |||||||||||||||||||||||||||||||||||||||||||||||||||
profile | integer | - | |||||||||||||||||||||||||||||||||||||||||||||||||||
projects_billable_by_default | boolean | - | |||||||||||||||||||||||||||||||||||||||||||||||||||
rate_last_updated | string | - | |||||||||||||||||||||||||||||||||||||||||||||||||||
reports_collapse | boolean | - | |||||||||||||||||||||||||||||||||||||||||||||||||||
role | string | - | |||||||||||||||||||||||||||||||||||||||||||||||||||
rounding | integer | - | |||||||||||||||||||||||||||||||||||||||||||||||||||
rounding_minutes | integer | - | |||||||||||||||||||||||||||||||||||||||||||||||||||
server_deleted_at | string | - | |||||||||||||||||||||||||||||||||||||||||||||||||||
subscription |
| - | |||||||||||||||||||||||||||||||||||||||||||||||||||
suspended_at | string | - | |||||||||||||||||||||||||||||||||||||||||||||||||||
te_constraints |
| - | |||||||||||||||||||||||||||||||||||||||||||||||||||
working_hours_in_minutes | integer | - |
403​
User does not have access to this resource.
500​
Internal Server Error