Checking running timer

I’m starting timers from my app, so that the running timer appears in FreeAgent UI. But, if the user stops the timer in FreeAgent (rather than using my app) I can’t seem to find a way to tell my app that the timer has stopped. Ideally there’d be a webhook that fires when a timer is stopped, but I don’t believe that exists. Only option I can see is to keep polling the timeslips endpoint to check that the timer is still running, but that’s not ideal. Has anyone found a way around this?

Not sure what time of app you are making but I can see various ways to do this (altough admitedly not ideal).

  1. Ignore the timer being stopped on the web and use your app as the source of truth (basically override the web value).
  2. Keep polling and stop the timer in your app if it was stopped on the site.

Yes. Think I’m going to take the approach that when the user stops my app timer I’ll check whether the current timeslip already has a logged time (which means the timer has been stopped in FreeAgent). If it has, I’ll give the user the choice of keeping the time that has already been logged, or replacing it with the value from the app timer. Thanks for your reply.

1 Like

Hey, I’m one of the engineers at FreeAgent. Seems like you’ve found a sensible solution. Let us know if you need any more assistance :slightly_smiling_face:

Thanks George - yes, think this approach will work, so I’m good for now