Errors and Limits
The errors the API returns, and its rate limits.
Errors
Errors have the same JSON shape:
Response
{
"response": null,
"error": "insufficient_scope",
"error_description": "This token's scope does not permit this action"
}
Use error in your code. error_description is for people and may change.
| Status | error | Meaning |
|---|---|---|
| 401 | missing_token | The request has no API key. |
| 401 | invalid_token | The API key is unknown, revoked or malformed. |
| 401 | not_your_vehicle | No customer shares this vehicle with your business. |
| 401 | not_your_energy_site | No customer shares this energy site with your business. |
| 403 | insufficient_scope | Your business may not do this: for example a command without command access, or a request that names no product. |
| 403 | permission_denied | The endpoint is not available to businesses. |
| 404 | business_not_found | Your business is not active. |
| 404 | webhook_not_found | No webhook is set. |
| 400 | invalid_webhook_url | The webhook URL is refused. |
| 429 | rate_limited | Too many requests. See Rate limits. |
| 502 | proxy_failed | Teslemetry could not reach the region that holds this customer's data. Try again. |
Not shared, or no longer shared
not_your_vehicle and not_your_energy_site have several causes, and the API does not say which:
- the customer never shared the product, or stopped sharing it,
- you removed the product,
- the customer no longer grants Teslemetry a permission your business requires, or
- the customer's Teslemetry connection has ended.
List your consented products to see what you can reach. If a product is missing, ask the customer to open your customer link again.
Vehicle and Tesla errors
Requests for a shared product return the same errors as the Teslemetry API, such as 408 when an asleep vehicle does not wake up in time.
Rate limits
Rate limits are counted per customer, not per API key:
| Group | Limit |
|---|---|
| Vehicle commands | 28 per 30 seconds |
| Vehicle wake-ups | 3 per 30 seconds |
| Energy site requests | 55 per minute |
| Time-of-use setting updates | 10 per 45 minutes, per energy site |
| Server-Sent Events connections | 20 at a time |
Exceeding a limit returns 429 rate_limited, with a retry-after header in seconds:
Response
{
"response": null,
"error": "rate_limited",
"error_description": "Rate limit exceeded, retry after 12 seconds"
}
Repeated requests with an invalid API key from the same IP address are slowed down too.
Tesla's Fleet API applies its own limits upstream.