Browse

insufficient_credits error

insufficient_credits is returned with HTTP 402. Retryable: no. Sending the same request again returns the same error. Nothing is charged for this error.

What it means

The account does not have enough credits for this lookup.

Most likely cause

The account balance is lower than the price of this lookup, often because the monthly credits are used up or a plan has lapsed.

How to fix it

Add credits to the account, then retry. Nothing was charged for this request.

Example

Read the balance first. A lookup that costs more than available is refused with HTTP 402 before any data source is called.

Terminal
curl -s https://YOUR_API_HOST/v1/account -H "Authorization: Bearer $LOOKVALID_API_KEY"

An error response is one JSON envelope. Branch on code, never on the message text. The message and fix of a real response can be more specific than the defaults shown here.

{
  "error": {
    "code": "insufficient_credits",
    "message": "The account does not have enough credits for this lookup.",
    "fix": "Add credits to the account, then retry. Nothing was charged for this request.",
    "docs_url": "https://lookvalid.com/docs/errors/insufficient_credits",
    "retryable": false,
    "request_id": "req_3fK9pQ2xVb7LmN4sTz8WcA"
  }
}

See also