webdew-logo-new_v2-1-1
   
webdew-logo-new_v2-1
Close
  • Services
  • Work
  • Resources
    • Knowledge
    • Ebooks
    • Tools
      • Website Audit
      • Website Grader
      • HubSpot ROI
  • Blog
  • About
Let's talk

  • fb-icon-01
  • tw-icon-01
  • insta-icon-01 (1)
  • linkedin-icon-01
  • youtube-icon-01
website-green-icon
Websites
  • Website Designing
  • Website Development
  • Website Migration
  • HubSpot Website
  • WordPress Website
  • Growth-Driven Design
video-blue-icon
Videos
  • 3D Videos
  • 2D Animation
  • Whiteboard Animation
  • Video Ads
  • Explainer Videos
  • Testimonial Videos
  • Onboarding Videos
  • Tutorial Videos
  • Social Media Videos
  • Product Demo Videos
marketing-yellow-icon
Marketing
  • Inbound Marketing
  • Inbound Consulting
  • Marketing Automation
  • Search Engine Optimization
  • Brand Domains
hubspot-red-icon
HubSpot
  • HubSpot Apps
  • HubSpot Themes
  • HubSpot Migration
  • HubSpot Onboarding
  • HubSpot Management
  • HubSpot Development
  • HubSpot Audit
  • Free HubSpot Demo
  • HubSpot Diamond Partner
webdew-logo-new_v2-1-1
  • Services
  • Work
  • Resources
    • Knowledge
    • Ebooks
    • Tools
      • Website Audit
      • Website Grader
      • HubSpot ROI
  • Blog
  • About
Let's talk

How to get Time Doctor logged data using API?

How to get Time Doctor logged data using API?-vbh
Tag: Websites
Author: Paramjeet Singh
Paramjeet Singh
Quick Links

Subscribe to Our Blog

Never Miss Any Update From Us !

With the world adapting to hybrid and remote workspaces, there is a need more than ever for companies and organizations to update themselves. Tracking and monitoring employee productivity and ensuring efficiency has become a challenging task for companies. 

Being a developer, developing website, maintaining productivity, and communicating with the team was something I faced challenges with. 

time doctor API features-11

Therefore, I am sharing this blog about time tracking software, Time Doctor, which has made remote work life a lot easier. I will also mention how to get the logged data using Application Programming Interface (API), which many other developers like me would find helpful.

What is Time Doctor?

Time Doctor is a SaaS employee monitoring tool that companies can use to view their employees' websites and applications. It is highly multifunctional and has Customer Relationship Management (CRM) and white-label capabilities. 

Time Doctor keeps track of how much time each team member spends on each project, client, or task and breaks it down by project, client, or task. 

Managers can see exactly where time is spent and how much time is spent on specific activities thanks to the second-by-second accuracy of the time monitoring data. Companies can use this information to bill clients or keep track of employee salaries.

Managers get a weekly report that details the websites and applications their staff used and for how long. Individual users will receive the same report, which will detail their time usage information.

This report, according to the provider, maximizes productivity tracking and assists in identifying productivity concerns.

At work, screenshots of the employee's computer are displayed every few minutes using the application. 

To retrieve reports and resources, Time Doctor uses an API. The first step to making use of the interface is to create an account in Time Doctor. 

time doctor API features

Once you create an account, you will be redirected to the dashboard. 

What is an API?

An Application Programming Interface (API) is a software that enables the users to connect two or more applications with each other through simple commands. It acts as a mediator by delivering your requests to the provider and reverts the response to you.   

APIs allow users to use pre-existing frameworks to develop code and software, eliminating creating code from scratch. This saves time and lets them concentrate on the proposition of their applications. 

They enable data to be transmitted from one system to another, hence establishing connectivity. APIs are a common technique for gaining access to any data or device in an application.

Let us now see how you can create a Time Doctor API to fetch data from Time Doctor. To create professional website application, you have to follow some rules. The authentication process is also essential. 

Essential considerations for your business app development

Here you will see how you can authenticate the app

Register your app

If you want to connect to the Time Doctor API with your own app, you must first register it to acquire a Client ID and Client Secret Key.

Step (a): Log in to https://webapi.timedoctor.com/app/login using your Time Doctor credentials.

Step (b): After you've logged in, go to the "Register Another Application" page and fill out the form. Save a copy of your CLIENT ID and SECRET KEY after submitting the form for future use -

time doctor APIRequesting Authorization from the User

There are two strategies you can choose while implementing this:

a. Authorization Code Grant Flow: This flow is helpful if you have your own server for your app. It is most commonly used for traditional web apps, desktop, and mobile apps. 

This url will return the auth code:

https://webapi.timedoctor.com/oauth/v2/auth?client_id=<YOUR_CLIENT_ID>&response_type=code&redirect_uri=<REDIRECT_URI>

Use the auth code and get the access token from here:

https://webapi.timedoctor.com/oauth/v2/token?client_id=<YOUR_CLIENT_ID>&client_secret=<YOUR_CLIENT_SECRET>&grant_type=authorization_code&redirect_uri=<REDIRECT_URI>&code=<RETURNED_CODE_FROM_POINT.a>

Implicit Grant Flow: It is useful when you don't have your own server for your app. It is suitable for in-browser web apps.

https://webapi.timedoctor.com/oauth/v2/auth?client_id=<CLIENT_ID>&redirect_uri=REDIRECT_URI&response_type=token- this url will redirect back on successful authentication with the access_token, refresh_token and expiry on the url 

Using the Access Token

After getting the Access_token, you can make authenticated requests to the API on the user's behalf. To do this, add the HTTP header of the form "Authorization: $access_token" to your requests.

Handling expired Access Token

The access token expires after a while. After it expires, you can use the refresh token to create a new set of tokens by requesting your app. 

Making an Authenticated request

You can make an authenticated request on the user's behalf in two ways:

  • By sending the access token as part of the query parameter.
  • By sending the access token as part of the request header.

You can also make use of API documentation, 

 

time doctor API feature

Or you can go through your dashboard. 

time doctor

Make sure you get access to your access token before starting to use your API. 

time doctor

Once you click, you will be redirected to the next page as below mentioned

time doctor API

Now you have your access token, which can be used anywhere in your app.

The next step is to create & test API, and for this, you can one of the API testing tools listed by RapidAPI. For our example, we will use Postman. Here is a small introduction about it, which is a reliable tool for testing API. 

Everything you need to know about Web Development as a beginner

What is Postman?

Postman is an API client for developers that makes it simple to create, share, test, and document APIs. 

Users can construct and save simple and sophisticated HTTP/s requests and read their responses to do this. As a result, you'll be more productive and spend less time working.

time-doctor

In case you haven't installed Postman, you can download it here. 

As we can create API URL there and then we can test in Postman, for more clarity, please follow the steps :

From the screenshots given below, you can see that the company's data is accessible with API. First, you will be required to fill your access token in  'Access Token.'  

time doctor-API

time-doctor-API

Now you need to click on the 'TRY' button. Once you click on the try button, you will get the data :

time doctor API features-img

Similarly, you can fetch any data as per your requirement. 

Wrapping Up

Time Doctor has proved to be a game-changer! It is ideal for service-based businesses where time monitoring is critical for billing and revenue. It is also suitable for both professional and personal use.

Now that I have shared the software that has helped me be productive and efficient, I hope this may be useful for many others. 

For more information, Contact us!

                                                                                                                                     Editor- Amrutha 

improve your website usability and UX

Related Blogs

A handy guide on how to create authenticated API in Laravel-vbh
Websites

A handy guide on how to create authenticated API in Laravel

A step-by-step guide on how to login with google in laravel-vbh
Websites

A step-by-step guide on how to login with google in laravel

What is the REST API in laravel: Everything you need to know-vbh
Websites

What is the REST API in laravel: Everything you need to know

review-star

Based on 1000+ Reviews on

footer-dot-logo-img
  • Hubspot_Logo-icon
  • clutch_Logo-icon
  • upwork_Logo-icon
  • designrush_Logo-icon
  • goodfirms_Logo-icon
  • g2_Logo-icon
WE ARE GLOBAL
  • US-flag
  • CA-flag
  • IN-flag
  • GB-flag

Copyright © 2019 - 2021 Webdew, Inc. All Rights Reserved

Copyright © 2019 - 2021 Webdew Labs Inc. All Rights Reserved

Copyright © 2016 - 2021 Webdew Private Limited. All Rights Reserved

Copyright © 2019 - 2021 Webdew, Inc. All Rights Reserved

WE ARE SOCIAL
  • fb-icon-01
  • tw-icon-01
  • insta-icon-01 (1)
  • linkedin-icon-01
  • youtube-icon-01
Terms of Services
Privacy Policy