toggl / toggl_api_docs

Documentation for the Toggl API
1.4k stars 235 forks source link

Request for current entry returning null #363

Closed gbpoole closed 2 years ago

gbpoole commented 4 years ago

My requests for the currently running entry are returning null and I don’t understand why. Specifically, when I run:

curl -v -u :api_token -X GET https://www.toggl.com/api/v8/me

... things work fine, but the following:

curl -v -u :api_token -X GET https://www.toggl.com/api/v8/time_entries/current

... returns:

{"data":null}

The user definitely has a task running, as far as I can tell.

Any idea what might be happening here?

chrisaligent commented 4 years ago

That's weird, I just tried it and it worked fine for me.

Are you absolutely sure that the user has a timer running right now? Sometimes if they start their timer using a desktop or mobile app, it shows that it's running but it hasn't actually synchronised back to the Toggl servers yet. (I realise it's been 10 days now and their timer probably isn't running anymore).

Started my timer and got:

curl -u <APITOKEN>:api_token -X GET 'https://www.toggl.com/api/v8/time_entries/current' 
{"data":{"id":1234567890,"guid":"<REDACTED>","wid":<REDACTED>,"pid":<REDACTED>,"billable":false,"start":"2020-03-05T04:42:18+00:00","duration":-1583383338,"description":"<Task Description>","duronly":false,"at":"2020-03-05T06:35:21+00:00","uid":<REDACTED>}}

Stopped my timer and got:

{"data":null}
gbpoole commented 4 years ago

Sorry ... through another channel this got resolved. I think I must have been making a mistake ... sorry!

Part of the confusion though was created by the fact that I couldn't find the return of null documented anywhere, so I didn't know how to interpret it: was that an authentication issue, a timer not going, etc.

It would help to have a bit more documentation of these things in the docs.

Thanks for the response and for your help.

joeriharleman commented 2 years ago

Hello @gbpoole!

Thank you for submitting your issue. Unfortunately this repository is largely unmaintained, which means issues remain unseen and do not get dealt with in a respectable manner. We're sorry for not getting back to you sooner.

This issue has been around for a long time so we will close it for now, but please let our excellent 24/5 support staff know you if you have any unresolved issues with our platform, documentation or APIs. They're also really good at noting down feature requests for our development teams. Please find them on our support page by clicking the little icon in the bottom right corner of the screen.

Kind regards, Joeri from Toggl