Check an IP address
Checks one IP address on its own: the country it is in, the network that owns it, and whether it is a Tor exit, a commercial VPN provider’s address, a hosting network or on a threat list.
Send claimedCountry, the country the person says they are in, to flag an address in another country. Send userAgent, the browser or app that made the request, to keep it with the result and have it summarised.
The checks run on Toden’s own data, never sent to a lookup provider: MaxMind GeoLite2 for the country and network, the Tor Project’s list of exit relays, X4BNet’s list of commercial VPN ranges (built from IPLocate.io data) and FireHOL level 1. The lists are refreshed hourly. A list that has not loaded answers null for its part, never false.
Country is the only place an address answers reliably, so no city or coordinates are given: on a mobile network they would be the carrier’s gateway, not the person.
Outside production it runs for real and is not charged, except on the test addresses, which answer with fixed facts and testData: true: 203.0.113.10 a mobile network in Nigeria (pass), 203.0.113.20 a VPN provider (review), 203.0.113.30 a Tor exit (fail), 203.0.113.40 on the threat list (review) and 203.0.113.50 a hosting network (review). They are in 203.0.113.0/24, which is reserved for documentation, so no real connection uses them.
Rules: send rules to set what each finding does (decline fails the check, review sends it to review, approve keeps it as a note and passes) and to change the check’s settings. Anything left out takes your organisation’s saved default rules (set in Spot Checks), else Toden’s, which judge the check as it was judged before rules existed. result.rules says which rules the check ran under, where each came from and what each finding did.
Charged per check at your price (production only); a check that could not be completed is not charged. Send a requestId: a retry with the same value returns the same check with replayed: true, without running or charging again.
Error codes
A missing or unknown key answers 401, where error is a short sentence rather than a code.
Requires a secret (sk_) key. A publishable key receives 403 secret_key_required.
Authentication
Send the API key as a Bearer token. Each operation states whether a publishable key is enough or a secret key is required. A scoped publishable key has Verification flow access, the fixed set flow.run, flow.config.read and verifications.status.read; a scoped secret key reaches what its scopes allow.
Request
The IP address, IPv4 (8.8.8.8) or IPv6 (2001:4860:4860::8888).
Optional. The ISO 3166-1 alpha-2 code of the country the person says they are in, e.g. NG.
Your own reference for the check (a customer or case id), kept with it and searchable in your history.
What each finding does. Defaults: tor decline; threat, vpn, privacy_network, country_mismatch and unknown_ip review.
Your idempotency key, 8 to 120 characters: a retry with the same value returns the same check.
Response
A retry: the check already run under this requestId.
The check id (chk_…).
pass: nothing of concern. review: something a person should look at. fail: a clear problem. unavailable: the check could not be completed, was not charged, and is never a pass.
What was sent, minimised: never image bytes, only media ids.
Why the check could not be completed, when outcome is unavailable.
On a run only: true when this is a check already run under the same requestId.