Troubleshooting
Getting 401 Unauthorized
- Is the
Authorizationheader present? - Does the value start with exactly
Bearer? - Was the full key copied without truncation or trailing newline?
- Is the key active and not revoked?
Getting UNKNOWN_UNIT
bash
curl "https://api.unifyunits.com/v1/units"
curl "https://api.unifyunits.com/v1/units/kg"Ambiguous aliases like gallon are rejected; use gal orimp-gal.
Getting INCOMPATIBLE_UNITS (422)
Source and target must share a category. Mass cannot convert to length.
Getting INVALID_VALUE
- Send a string, not a JSON number:
"10" - Use
.as the decimal separator - Do not include the unit in the value
Getting 429 Rate Limited
Use exponential backoff with theRetry-After header. Prefer batch requests to reduce HTTP request count.
Batch returns 200 but some items failed
Expected. Inspect each item's statusfield.