Errors

Errors are application/problem+json (RFC 9457). Read code: it is stable, while title and detail are for people and can change.

HTTP/1.1 403 Forbidden
Content-Type: application/problem+json

{
  "type": "https://tibiaglobalmarket.com/developers/docs/errors#IP_NOT_ALLOWED",
  "title": "Address not allowed",
  "status": 403,
  "code": "IP_NOT_ALLOWED",
  "detail": "This key is already in use from another address. Release the place in the dashboard to use it from here.",
  "request_id": "req_01JD3Q6V7Y2K",
  "docs_url": "https://tibiaglobalmarket.com/developers/docs/errors#IP_NOT_ALLOWED",
  "seen_ip": "198.51.100.23"
}
FieldMeaning
codeStable error code, from the list below.
statusThe HTTP status, repeated.
titleA short summary, in English.
detailWhat happened in this call, in English.
request_idThe id of the call, also in the X-Request-Id header.
docs_urlA link to the code on this page. type has the same link.

Handling errors

  • Retry 429 and 503 after Retry-After, with a cap on attempts.
  • Any other error needs a change on your side: the same call gets the same answer.
  • An HTML page instead of JSON comes from the network, not the API: never parse it as JSON; if it is a 5xx, retry later.
An HTML 400 Bad Request page means the request broke before reaching the API, usually because of an invisible character pasted with the key. Keep the key in TGM_API_KEY and send the variable (Getting started).

Error codes

VALIDATION_FAILED

400Validation failedDo not retry
When
A parameter is missing, out of range or unknown, or a value in the path is malformed.
What to do
Read detail, fix the request and send it again.

KEY_IN_QUERY

400Key in the URLDo not retry
When
The key was sent in the query string.
What to do
The key is now marked as exposed. Replace it in your panel and send the new one only in the Authorization header.

INVALID_KEY

401Invalid keyDo not retry
When
The key is missing, malformed or unknown.
What to do
Check that the header is Authorization: Bearer <key> and that the key is the current one. Many of these answers from the same address are slowed down with 429 for a minute.

KEY_REVOKED

401Key revokedDo not retry
When
The key was replaced or revoked.
What to do
Use the current key from your panel.

MODULE_NOT_IN_PLAN

403Module not in planDo not retry
When
The endpoint belongs to a module your plan does not have.
What to do
Add the module named in required_module at upgrade_url.
Extra fields
required_moduleupgrade_url

WORLD_NOT_IN_PLAN

403World not in planDo not retry
When
The world is not in the market module of your plan.
What to do
The worlds of your plan are fixed for the whole cycle. To get other worlds, place an order on the plan page.

PLAN_EXPIRED

403Plan expiredDo not retry
When
Your plan has ended.
What to do
Place a new order on the plan page; the key stays the same.

ACCOUNT_SUSPENDED

403Account suspendedDo not retry
When
The account was suspended.
What to do
Contact us through the feedback chat on the site.

KEY_LOCKED

403Key lockedDo not retry
When
The key is locked; reason says why (see Locked keys).
What to do
If locked_until has a time, wait until then (Retry-After says the same in seconds) and slow your script down. If it is null, replace the key in your panel.
Extra fields
reasonlocked_until

IP_NOT_ALLOWED

403Address not allowedDo not retry
When
The key is already in use from another address: its place was defined by an earlier data call. seen_ip is the address we saw.
What to do
Run your script on the machine that holds the place, or release the place in your panel to use the key from here. seen_ip shows the address we saw; your panel shows the place.
Extra fields
seen_ip

PROXY_NOT_SUPPORTED

403Proxy not supportedDo not retry
When
The call came out of a shared egress network, such as a proxy service or a serverless platform.
What to do
Call from your own server or connection.

ITEM_NOT_FOUND

404Item not foundDo not retry
When
There is no item with this item_id, or the item is not served by the API.
What to do
Look the id up with GET /v1/items.

WORLD_NOT_FOUND

404World not foundDo not retry
When
There is no world with this name.
What to do
Use a name from GET /v1/worlds, spelled the same way.

AUCTION_NOT_FOUND

404Auction not foundDo not retry
When
There is no character auction with this id. Used by the bazaar module.
What to do
Check the auction id.

CHARACTER_NOT_FOUND

404Character not foundDo not retry
When
There is no character with this name. Used by the bazaar and highscores modules.
What to do
Check how the name is spelled.

IP_IN_USE

409Key in use from another placeDo not retry
When
Another place is using the key right now. It is not returned while the key keeps one fixed place.
What to do
Stop the other copy of your script, or wait until session_expires_at.
Extra fields
session_expires_at

RATE_LIMITED

429Too many requestsRetry after Retry-After
When
More than 60 requests in a minute.
What to do
Wait the seconds in Retry-After. A key that ignores it may be locked for a while.

QUOTA_EXCEEDED

429Daily quota exceededRetry after Retry-After
When
The key has used its 20,000 units for today.
What to do
Wait until resets_at (00:00 UTC). To spend less, use If-None-Match and the single-item endpoint.
Extra fields
resets_at

DATA_UNAVAILABLE

503Data unavailableRetry after Retry-After
When
This data is temporarily unavailable.
What to do
Wait the seconds in Retry-After and try again, with a cap on attempts. It costs 0 units.

BUSY

503BusyRetry after Retry-After
When
The server is busy, or the world in your plan has no data ready yet.
What to do
Wait the seconds in Retry-After and try again. It costs 0 units.