TeamTrace API Troubleshooting

Created by TeamTrace Support, Modified on Wed, 18 Nov at 4:53 AM by TeamTrace Support

Overview

When an API request doesn't work, the cause is usually one of a few common things: a missing or expired token, a value in the wrong format, the wrong method, or a network problem. This article helps you find the cause quickly. It starts with a short checklist, then lists problems by what you see, and ends with what to gather if you need to contact support.


Before You Begin

  • Have the full request you sent: the URL, the method, the headers (without the secret values) and the body.
  • Have the full response: the HTTP status code and the JSON message.
  • Use a tool such as cURL or Postman to repeat the request on its own. If it works there but fails in your code, the problem is in your code.


Quick Checklist

Go through these in order. Most problems are solved in the first three steps.

  1. Check the URL. It should start with https://api-info.teamtrace.app and the path should match the endpoint exactly.
  2. Check the method. The authorization, Customer Task List, Leave List, Screenshot Fetch and both timesheet endpoints use POST. The Customer List and User List use GET.
  3. Check the token. Every endpoint except authorization needs the authorization header with a valid token.
  4. Check the headers. Requests with a JSON body need Content-Type: application/json.
  5. Check the values. Dates must be YYYY-MM-DD, IDs must be valid UUIDs, and page and limit must be whole numbers of 1 or more.
  6. Check the required fields. Make sure you sent every required parameter. See the table below.
  7. Read the response. The status code and message usually say what to fix. See TeamTrace API Error Codes. 


Required parameters by endpoint

EndpointRequired
API AuthorizationHeaders x-client-id and x-client-secret.
Customer ListHeader authorization, and query parameter customer_status.
Customer Task ListHeader authorization, and body field uuid.
User ListHeader authorization. All parameters are optional.
Leave ListHeader authorization. All filters are optional.
Employee Screenshot FetchHeader authorization, and body fields date and user_id.
Detailed Timesheet and Field People TimesheetHeader authorization, query parameters page and limit, and body field date.


Problems Getting a Token

What you seeWhat to check
The authorization request is rejectedCheck that you send both x-client-id and x-client-secret, that the header names are spelled exactly, and that the values are correct.
It fails even though the values look rightCopy the values again and look for extra spaces or missing characters at the start or end. Check that the Client ID and Client Secret belong together.
An error about the methodThe authorization endpoint uses POST, not GET.
The credentials are in the URL or the bodyMove them to the x-client-id and x-client-secret headers.
I don't have a Client ID or Client SecretSend an email to support@teamtrace.app for Client ID or Client Secret

For more detail, see How to Authenticate with the TeamTrace API and Understanding x-client-id and x-client-secret in the TeamTrace API.


Test the authorization request on its own

curl -X POST "https://api-info.teamtrace.app/api/authorization" \
 -H "x-client-id: YOUR_CLIENT_ID" \
 -H "x-client-secret: YOUR_CLIENT_SECRET"

If this works in cURL but not in your code, compare the headers your code sends with the ones above.


401 Unauthorized

What you seeWhat to check
401 on every requestCheck that the authorization header is in the request, that the name is spelled exactly, and that it holds the token you received.
It worked earlier and now returns 401The token has probably expired. Request a new token and try again. ​
401 right after I got a tokenCheck that you copied the whole token, with no extra spaces or line breaks. ​
I sent the Client ID and Client Secret to another endpointOnly the authorization endpoint uses them. All other endpoints need the authorization header with the token.


400 Bad Request

MessageWhat to fix
Invalid date format. Use YYYY-MM-DDSend every date as year, month, day, separated by hyphens, for example 2026-04-21. Formats such as 21-04-2026 or 04/21/2026 are not accepted.
Invalid user_idSend the full UUID, for example 123e4567-e89b-12d3-a456-426614174000. A UUID has 36 characters, including hyphens. Get it from the user list.
Page and limit must be integers ≥ 1Send page and limit as whole numbers of 1 or more, in the URL. Values such as 0, -1, 2.5 or text are rejected.

A 400 error means the request itself needs a fix. Sending it again unchanged gives the same error.


Errors About a Missing or Invalid Value

For some endpoints, the documentation says only that an error is returned when the authorization fails or a required or invalid value is sent. Use this table to find the likely cause.

EndpointCommon causes
Customer Listcustomer_status is missing or is not exactly ACTIVE or INACTIVE. Or limit or page is invalid.
Customer Task ListThe uuid is missing or invalid, a date is not in YYYY-MM-DD format, or limit or page is invalid.
User Listuser_current_status is not P, C or empty, or limit or page is invalid.
Leave ListA date is not in YYYY-MM-DD format, status is not P, C, R, CN or empty, or limit or page is invalid.
Screenshot Fetchdate or user_id is missing, or the body is empty.
Timesheetspage or limit is missing from the URL, or date is missing from the body.


The Request Is Sent, but the Data Looks Wrong

What you seeWhat to check
The list is empty, with no errorAn empty list is a valid response. It means no records match. Check your filters and the date, and try removing a filter to see if it is too narrow.
I don't get all the recordsResults are split into pages. Increase limit, or request the next page, until you have everything.
The Customer List returns the wrong customersACTIVE means current customers and INACTIVE means past customers. Check the customer_status value.
The User List returns the wrong usersC returns current users, P returns past users, and an empty value returns all users.
The Leave List ignores my filterFilters go in the JSON body, and limit and page go in the URL. Check that you sent the Content-Type: application/json header.
My POST body seems to be ignoredAdd the Content-Type: application/json header and send valid JSON.
No screenshots for a dateThe list is empty when there are none. Check the date and the user. This is not an error.


Network and Server Problems

What you seeWhat to check
500 Internal server errorThe problem is on the TeamTrace side. Wait a moment and retry. If it keeps happening, contact support.
The request times out, or there is no response at allCheck your internet connection, any firewall or proxy, and that the URL is correct. Then retry. A timeout means no status code or JSON error comes back.
It works from my computer but not from my serverCheck whether your server's network blocks outgoing HTTPS requests to api-info.teamtrace.app. [Add: whether access can be limited by IP address, and any addresses to allow.]
Requests are refused for sending too manySlow down and retry with a backoff. See TeamTrace API Rate Limits.


Retry on network failures

async function fetchWithRetry(url, options, retries = 3) {
  try {
    const res = await fetch(url, options);
    return res;
  } catch (err) {
    if (retries > 0) {
      return fetchWithRetry(url, options, retries - 1);
    }
    throw err;
  }
}


Find Your Own Mistakes Before You Send

Most 400 errors can be caught by checking values in your own code first.

function isValidDate(date) {
  return /^\d{4}-\d{2}-\d{2}$/.test(date);
}

function isUUID(id) {
  return /^[0-9a-fA-F-]{36}$/.test(id);
}

To compare your request with a known-good one, see TeamTrace API Request Examples.


Before You Contact Support

If you have been through the checks above and the problem remains, gather these details. They help support find the cause faster.

  • The endpoint and method you called.
  • The time of the request, with your time zone.
  • The full response: the status code and the message.
  • The request you sent: the URL, the headers and the body.
  • What you already tried.

Never include your Client Secret or your token in a message to support, a ticket or a screenshot. Replace them with placeholders such as YOUR_TOKEN.


Tips

  • Change one thing at a time. If you change several things at once, you won't know which one fixed it.
  • Start from a working example. Copy a request from the examples article and change it step by step toward what you need.
  • Test the simplest endpoint first. If the User List works, your token and headers are fine, and the problem is in the other request.
  • Read the message. It names the problem, for example the date, the user ID or the pagination values.
  • Keep a log of failed requests in your own application, without the token or secret.


Notes

  • Dates must be in YYYY-MM-DD format in every endpoint that accepts a date.
  • Only the authorization endpoint uses x-client-id and x-client-secret. Every other endpoint uses the authorization header.
  • An empty list with a success status is not an error.
  • In the Leave List documentation, the limit parameter is described as a string, while other endpoints describe it as an integer. If a request with limit fails, check this first.


Related Articles

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article