What You Will Learn
- What a 403 forbidden error means and how it differs from other HTTP authentication errors
- The five most common causes of 403 errors
- A step-by-step diagnostic checklist to identify and resolve the issue
- How to avoid hidden-character issues when copying API keys
Understanding 403 Forbidden Errors #
When working with any REST API, HTTP status codes are the main way the server communicates the outcome of your request. A 403 Forbidden error means that the server received your request and understood it, but is refusing to authorize it.
Is the server’s way of saying: “I know who you are (or at least I see your request), but I’m not letting you in.” This is different from a 401 Unauthorized Error, which means that the server does not recognize who you are (typically because no credentials were provided). A 403 error means your credentials—valid or not—simply don’t have the authorization required for that specific request you’re making.
Understanding this distinction is important because it narrows the troubleshooting scope. The problem is NOT that your request failed to reach the server. It’s that something about your API key, account status, or product access configuration is preventing the server from fulfilling it.
Use this guide to diagnose and resolve 403 errors when integrating with our APIs.
Common Causes of 403 Errors #
| Cause | Description | What to Check |
| Invalid API Key | The key provided doesn’t match any active API key in our records. | Check for trailing spaces, typos, or incorrect character counts. See the “Copy-Paste” section below. |
| Missing API Key | The x-api-key header was not included in the request, or it was sent as an empty string. | Ensure your code is actually passing the header in the request. Trestle authenticates via the x-api-key header on all API requests. |
| Disabled API Key | The key exists but has been deactivated. Often due to an empty Developer Portal Wallet. | Log into the Developer Portal and check your Wallet balance. If there are insufficient funds, the key may be disabled until the balance is replenished. Contact your account admin if needed. |
| Product Access Not Granted | The key is active but doesn’t have permission for the specific API product you’re querying. | Verify that the product you are calling (e.g., Reverse Phone API, Caller Identification API, or Reverse Address API) is enabled for your key. |
| Expired Trial API Key | The was issued under a free trial and has reached its expiration. | Trestle’s free trial includes 25 queries within a 14-day window. Once either limit is reached, the key can no longer be used for that product. A new key must be generated. |
Step-by-Step Diagnostic Checklist #
If you are receiving a 403, run through these four questions to find the culprit:
Question 1: Are You Using an AI/LLM to Write Your Code? #
If you are using ChatGPT, Claude, or Gemini to generate your integration code, they may be using outdated or “hallucinated” syntax, incorrect endpoint paths, or fabricated headers
- The Fix: Copy and paste our official API documentation directly into the LLM prompt and instruct it: “Use this specific documentation to format my request.” This ensures the model uses the correct base URL (https://api.trestleiq.com), the correct authentication header (x-api-key), and the current version path.
Question 2: Is The Endpoint URL Correct? #
Sometimes 403s occur when the request path doesn’t exist or isn’t accessible to public users.
- The Fix: Verify your full query string against our API documentation or Postman Collection. If an AI tool generated the URL, it may have used a “placeholder” endpoint that doesn’t actually exist in our infrastructure.
For example:
https://api.trestleiq.com/3.0/phone_intel Would return a successful query.
https://api.trestleiq.com/2.0/phone_lookup Would NOT return a successful query.
Question 3: Are You Using the Current API Version? #
We occasionally deprecate older versions of our API. If you’re querying a version that has been sunset (e.g., /3.1/ when the current version is /3.2/), the server will refuse the request.
- The Fix: Check the version number in your URL path and compare it against the current version listed in our API documentation. Update the path if you are calling a depreciated version.
Question 4: Does Your API Key Have Access to this Product? #
An active key does not automatically grant access to every Trestle product. Keys are often scoped to specific products. For example, your key may be enabled for Phone Validation API but not Reverse Phone API or Caller Identification API.
- The Fix: Log into the Developer Portal and navigate to the product page for the API you are querying.
- If the product displays “Try Now”, your key has access.
- If the product page displays “Request Access”, then you do not have permission for that product, and you will receive a 403 when you query that endpoint.
To request access to additional products, click “Request Access” and provide a brief description of your use case. A member of the Trestle team will follow up.
Note for Trial Users: All new sign-ups automatically receive access to Phone Validation API, Real Contact API, and Address Validation API. Access to other products (e.g., Reverse Phone API, Caller Identification API, and Reverse Address API) must be requested through the process above.

Avoiding The “Copy-Paste” Trap #
A surprisingly common cause of 403 errors is invisible characters embedded in your API key. When copying your key, it’s easy to accidentally grab a leading space, trailing space, or other accidental character.
How to verify your key is clean:
- Copy your API key directly from the Developer Portal.
- Paste it into a plain-text editor (e.g., TextEdit in plain-text mode on Mac).
- Check that there are no extra spaces or characters before or after the key.
- Use this cleaned version in your code.
This step takes only a few seconds and eliminates one of the more frequent (and frustrating) sources of 403 errors.
Still Getting a 403 Error? #
If you have worked through the checklist and the error persists, contact support at support@trestleiq.com and provide:
- Which product you are attempting to query (for example: “Phone Validation”)
- The API endpoint you are attempting to query (for example: https://api.trestleiq.com/3.0/phone_intel?)
This helps our team diagnose the issue quickly.
Frequently Asked Questions #
What does a 403 Forbidden error mean? #
A 403 Forbidden error means the server received and understood your request but is refusing to authorize it. With Trestle’s APIs, this almost always points to an issue with your API key, your account status, or your product access. It is not a problem with your code reaching our servers.
What is the difference between a 401 and a 403 error? #
A 401 Unauthorized error means the server does not recognize who you are, typically because no credentials were provided. A 403 Forbidden error means the server sees your credentials but is refusing the request anyway. This is usually because the key is invalid, disabled, or lacks access to the product you’re querying.
Why is my valid API key still returning a 403 error? #
An active API key does not automatically grant access to every Trestle product. Keys are scoped to specific products, so a key that works for one API may return a 403 when used against another. Log into the Developer Portal and confirm the product you’re querying shows “Try Now” rather than “Request Access.”
Which Trestle APIs are included with a free trial? #
All new sign-ups automatically receive trial access to Phone Validation API, Real Contact API, and Address Validation API. Access to Reverse Phone API, Caller Identification API, and Reverse Address API must be requested through the Developer Portal by clicking “Request Access” on the product page.
Why was my API key disabled? #
The most common reason an API key is disabled is an empty Developer Portal Wallet. If your Wallet balance reaches zero, your key may be deactivated until funds are replenished. Log into the Developer Portal to check your balance, or contact your account administrator.
Does Trestle use an IP allowlist or whitelist? #
No. Trestle does not use an IP allowlist, allow list, or whitelist for API authentication. All requests are authenticated using the x-api-key header, regardless of the IP address the request originates from.
Why are AI coding assistants generating broken Trestle API requests? #
LLMs like ChatGPT, Claude, and Gemini sometimes use outdated syntax, incorrect endpoint paths, or fabricated headers when generating code. To avoid this, paste Trestle’s official API documentation directly into the prompt and instruct the model to use it as the source of truth for your request format.