An R client for the Toggl Track API: start and stop timers from R or RStudio, read and write time entries, projects and clients, and download reports.
Reads never return silently truncated or empty results: HTTP errors are raised, the hourly quota and rate limits of the API are respected, and paginated reports are checked for completeness.
Documentation site: https://thinkr-open.github.io/togglr/
From CRAN:
install.packages("togglr")The development version, from GitHub:
if (!requireNamespace("remotes")) install.packages("remotes")
remotes::install_github("ThinkR-open/togglr")Your token is at the bottom of your Toggl profile page:
togglr::open_toggl_website_profile()Store it once in your keyring:
library(togglr)
set_toggl_api_token("your_token_api")Every function also accepts an api_token argument, and a
workspace_id (the default workspace of your account
otherwise, see get_workspaces()).
toggl_start() # a new entry, in a project named after your RStudio project
toggl_start(client = "my client", description = "what I'm doing",
project_name = "my project", tags = c("dev", "R"))
toggl_stop()
get_current_duration() # the running entry
get_current_project_task_detail() # the tasks of the current projectRStudio addins ‘start toggl’ and ‘stop toggl’ are provided: bind them to keyboard shortcuts.
Reports come from the Toggl Reports API v3.
# every time entry of a period, one row per entry
get_detailled_report(since = "2026-01-01", until = "2026-03-31")
# only some users
get_detailled_report(since = "2026-01-01", until = "2026-03-31", user_ids = 123456)
get_summary_report(since = "2026-09-01", until = "2026-09-30") # per user
get_weekly_report(since = "2026-09-07", until = "2026-09-13") # per project and day
get_dashboard(since = "2026-09-01", until = "2026-09-30") # per projectget_time_entries() reads your own entries of the last 3
months (a limit of the API); for older periods, use
get_detailled_report(user_ids = ).
A few options, documented in ?togglr, tune the requests:
for example options(togglr.min_interval = 16) spreads a
long extraction to spare the hourly quota of the API, and
options(togglr.state_file = "...") shares the pacing and
the known quota between R processes (callr, future, targets
workers).