Trying to get time entries from all the users in my organizations but get 405 error

,

Hi Y’all
I am making an extension for my workspace in toggle and i need to be able to get all the time entries of all the active users, i use the url: https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/time_entries
but i get a 405 error.
Anybody any idea what i can do about this?

Thanks in advance!

Hi Wouter,

I use this Reports API endpoint in my tool to get all the time entries for my workspace: https://api.track.toggl.com/reports/api/v3/workspace/{workspace_id}/search/time_entries

I hope this helps!

Regards,
Michael

Hi Michael,

In the meantime, I have found the solution. However, I sincerely appreciate the time and effort you took to respond to my inquiry.

Thank you very much for your assistance.

Best regards,
Wouter

Hi there!
Is there any chance you could elaborate on how you resolved the 405 error, please? I’m having the same issue. I have the highest level of permissions and I have the URL and workspace ID correct, so I’m not sure what to jiggle next, troubleshooting-wise.
Thanks,

Lydia

(https://api.track.toggl.com/reports/api/v3/workspace/{workspace_id}/search/time_entries)

Hey Lydia here’s the full picture in one go, hope this clears it up :slightly_smiling_face:

The 405 error comes from the fact that
/api/v9/workspaces/{workspace_id}/time_entries simply isn’t meant to return all users’ time entries, even with full permissions. That endpoint is limited by design, so the error isn’t something you can fix via roles or settings.

For historical time entries across the whole workspace, the solution is to use the Reports API instead:
POST https://api.track.toggl.com/reports/api/v3/workspace/{workspace_id}/search/time_entries

This endpoint is built for workspace-wide reporting and works as expected when you pass a date range (and optionally user filters).

For active (running) time entries, there’s no single workspace-level endpoint. What worked for me was:

  • Fetch all active users in the workspace

  • Loop over those users and authenticate with their individual API tokens

  • Call:
    GET https://api.track.toggl.com/api/v9/me/time_entries

  • A running timer is identified by a negative duration

  • If none is running, you can fall back to the user’s last stopped entry

So the final setup looks like this:

  • Past entries (all users) → Reports API

  • Current running entries → per-user /me/time_entries

Hopefully this saves you some debugging time!