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.
- Check the URL. It should start with https://api-info.teamtrace.app and the path should match the endpoint exactly.
- 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.
- Check the token. Every endpoint except authorization needs the authorization header with a valid token.
- Check the headers. Requests with a JSON body need Content-Type: application/json.
- 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.
- Check the required fields. Make sure you sent every required parameter. See the table below.
- Read the response. The status code and message usually say what to fix. See TeamTrace API Error Codes.
Required parameters by endpoint
| Endpoint | Required |
| API Authorization | Headers x-client-id and x-client-secret. |
| Customer List | Header authorization, and query parameter customer_status. |
| Customer Task List | Header authorization, and body field uuid. |
| User List | Header authorization. All parameters are optional. |
| Leave List | Header authorization. All filters are optional. |
| Employee Screenshot Fetch | Header authorization, and body fields date and user_id. |
| Detailed Timesheet and Field People Timesheet | Header authorization, query parameters page and limit, and body field date. |
Problems Getting a Token
| What you see | What to check |
| The authorization request is rejected | Check 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 right | Copy 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 method | The authorization endpoint uses POST, not GET. |
| The credentials are in the URL or the body | Move them to the x-client-id and x-client-secret headers. |
| I don't have a Client ID or Client Secret | Send 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 see | What to check |
| 401 on every request | Check 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 401 | The token has probably expired. Request a new token and try again. |
| 401 right after I got a token | Check that you copied the whole token, with no extra spaces or line breaks. |
| I sent the Client ID and Client Secret to another endpoint | Only the authorization endpoint uses them. All other endpoints need the authorization header with the token. |
400 Bad Request
| Message | What to fix |
| Invalid date format. Use YYYY-MM-DD | Send 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_id | Send 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 ≥ 1 | Send 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.
| Endpoint | Common causes |
| Customer List | customer_status is missing or is not exactly ACTIVE or INACTIVE. Or limit or page is invalid. |
| Customer Task List | The uuid is missing or invalid, a date is not in YYYY-MM-DD format, or limit or page is invalid. |
| User List | user_current_status is not P, C or empty, or limit or page is invalid. |
| Leave List | A date is not in YYYY-MM-DD format, status is not P, C, R, CN or empty, or limit or page is invalid. |
| Screenshot Fetch | date or user_id is missing, or the body is empty. |
| Timesheets | page 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 see | What to check |
| The list is empty, with no error | An 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 records | Results are split into pages. Increase limit, or request the next page, until you have everything. |
| The Customer List returns the wrong customers | ACTIVE means current customers and INACTIVE means past customers. Check the customer_status value. |
| The User List returns the wrong users | C returns current users, P returns past users, and an empty value returns all users. |
| The Leave List ignores my filter | Filters 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 ignored | Add the Content-Type: application/json header and send valid JSON. |
| No screenshots for a date | The list is empty when there are none. Check the date and the user. This is not an error. |
Network and Server Problems
| What you see | What to check |
| 500 Internal server error | The 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 all | Check 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 server | Check 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 many | Slow 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
Feedback sent
We appreciate your effort and will try to fix the article