How to Use the Time Doctor 2 API

This article will explain how you can use the Time Doctor 2 API to access the data in your Time Doctor 2 account. It will also explain how to integrate your own application with Time Doctor 2.

To get access to the Time Doctor 2 API, go to this link.

Once you have the Time Doctor 2 API, you’ll need to authorize yourself in the system and generate a token.

Click on “auth” and select the appropriate login field. If you are using the silent version of the Time Doctor 2 app, click on api/1.0/authorization/silent.

For this article, we’ll be using the login for the interactive version of Time Doctor 2: api/1.0/authorization/login

Open the dialog box and click on the “Model Schema” window to paste the information into the POST Body window. 

{
"deviceId": " ", This can be any number
"email": " ", Your account email
"password": " ", Your account password
"totpCode": " ", The code for two-factor authorization (This line can be removed.)
"readOnly": " " Either 1 (yes) or 0 (no) (This line can be removed.)
 }

After filling in the form, click “Try it out!” You’ll get a response with your user information and your token. 

Copy the token that appears in the “Response Body” and paste it into a token field at the top of the page. 

Do NOT click “Explore.” Simply paste the token and you should be ready to query the Time Doctor 2 API.

Time Doctor 2 supports four call methods:

GET: Allows you to read data.
POST: Allows you to create new data.
PUT: Allows you to modify existing data.
DELETE: Allows you to delete data.