Skip to main content

API Key Authentication

All API requests require an API key passed in the X-API-Key header.

Getting an API key

  1. Sign up at tronrental.com
  2. Top up your balance in Dashboard → Deposit: an API key is issued once your top-ups total at least 100 TRX
  3. Go to Dashboard → API Keys
  4. Click Create API Key
  5. Copy and securely store your key — it’s shown only once
A new email account is created only after you confirm the address: TronRental mails a 6-digit code, and the account exists once that code is entered.

Top-up before the first key

The 100 TRX is the total of all top-ups ever credited to the account; a USDT top-up counts at the TRX amount it was credited as. It is history, not the balance: spending the balance does not take a key away. Until the total reaches 100 TRX, POST /v1/auth/api-keys answers 403:
required_trx is the bar and missing_trx what is left to top up, both in TRX as strings. Get API Key Limits shows the same two numbers as deposit_required_trx and deposit_missing_trx before you try. The same check applies when you switch on a key that was switched off because its account had never topped up. Node API keys are not subject to it: a Node API plan gates them.

Signing up via the API (AI agents)

An agent or script can open an account, top it up and, once the top-ups reach 100 TRX, issue a key without the website. It needs the user’s real email: the account is created only with the code from that inbox. 1. Start the sign-up — no account is created yet, a 6-digit code is mailed to the address:
The code is valid for 10 minutes. If a valid code is already pending, no second email is sent. To get a new code, call POST /v1/auth/email-code/send with {"email": "...", "language": "en"}: the previous code stops working, and an address gets at most 3 emails per hour. 2. Confirm the email — send the code together with the same password (it is not stored before this step). This creates the account and signs in:
3. Top up — the access token is enough to get the deposit address. Send TRX or USDT to the deposit_address it returns:
The same header works for the balance (GET /v1/account/balance), purchases and orders, so a first order does not wait for a key. The access token is valid for 1 hour; for a new one, sign in with POST /v1/auth/login and {"email": "...", "password": "..."}. 4. Create an API key once the account’s top-ups total 100 TRX:
The key field of the response is the API key — it is shown only once. Below 100 TRX the answer is 403 API_KEY_DEPOSIT_REQUIRED with the amount still missing in missing_trx — see Top-up before the first key.
The local MCP package runs these steps with the register, verify_email_code, get_deposit_address and create_api_key tools.

IP Whitelist (optional)

You can restrict your API key to specific IP addresses for additional security. Configure this in the dashboard when creating or editing a key.

Key permissions

Each API key carries scopes — the operations it is allowed to perform. You choose them in the dashboard when you create or edit a key. A new key gets every read and write scope (buying energy and bandwidth, Smart Mode, reading the balance and history, and more) except withdraw: that scope is enabled separately and requires 2FA and an IP whitelist; enabling it, changing such a key’s IP whitelist and regenerating the key are confirmed with your 2FA code or passkey. A request outside the key’s scopes is refused with HTTP 403. The full list: List API Key Scopes.
Keep your API key secret. Do not expose it in client-side code, public repositories, or URLs.

Node API keys

Node API — access to TRON full nodes at node.tronrental.com — has keys of its own. You create them as endpoints in Dashboard → Node API. A Node API key works only at the node: this API answers it with 403 NODE_API_KEY_ONLY. The API keys described on this page do not work at the node either. See Node API → Endpoints and keys.

Key usage & request log

Every request authenticated with an API key is recorded for 7 days: method, path, status code, latency and client IP. Query strings are not stored in this view. Open Dashboard → API Keys and expand a key to see its recent requests; the Last Used column shows the most recent call (the auth-time mark is updated at most once per 5 minutes, the request log is exact). The log is available from the dashboard only — an API key cannot read its own log.

Rate Limits

API keys are rate-limited per account, not per key: every key of one account shares a single budget. See Rate Limits for details.

Errors

Authentication errors return HTTP 401:
If your key is disabled or blocked, you’ll receive HTTP 403.