Overview
The API v3 accepts an API key for all methods. Requests without an API key are limited to one request per second. To make more than one request per second, please include an API key. The key can be sent either in an HTTP header or as a query parameter. Only one of these is needed per request. To obtain an API key, see the TON Center API key guide.| Method | Location | Name |
|---|---|---|
| API key | Header | X-API-Key |
| API key | Query | api_key |
Public hosts
| Network | Host |
|---|---|
| Testnet | https://testnet.toncenter.com/api/v3 |
| Mainnet | https://toncenter.com/api/v3 |
REST endpoint authentication
Header authentication
Send the API key in theX-API-Key header:
Query parameter authentication
Pass the key as a query parameter namedapi_key:
API key error codes
| Status | Error | Meaning |
|---|---|---|
401 | API key does not exist | The provided key is invalid. Check for typos or generate a new key. |
403 | Network not allowed | The key was issued for a different network (e.g., testnet key on mainnet). Use a key matching the target network. |
429 | Ratelimit exceeded | Too many requests. Back off and retry, or use an API key for higher limits. |