Skip to content

Increase limit of the IP Lookup

Yaroslav Borodii edited this page Jun 8, 2024 · 2 revisions

Keywords: IP Lookup doesn't work; console returns error: "Limit Exceed"; IP Lookup doesn't change country; How to setup IP Lookup;

Intro

Smart Phone for Ninja Forms has an option to automatically set the user's country based on their IP address.
We use ipinfo.io to get users IP address and country as it provides 50,000 requests per month which is more than enough for small and medium businesses. If you exceed this limit, you can choose any plan on ipinfo.io and put their API key in the field settings.

Find the IP Lookup option

To find the option:

  1. Open your Ninja Form;
image
  1. Click on the Smart Phone field;
  2. Open field settings;
  3. Extend Restrictions settings;
image
  1. At the top of the extended settings you can find two options: ALLOW IP LOOKUP, IP LOOKUP API KEY;

NOTICE: To find "IP LOOKUP API KEY" you should enable "ALLOW IP LOOKUP".

image

Find API Key

  1. Open ipinfo.io;
  2. Sign up with a method you prefer (by google, github or manually);
  3. At the left sidebar click on the "Token";

It's a page where you can find your unique "Token".
To copy this token you can click on "Copy to Clipboard" and paste token in the settings field.

image

IMPORTANT: Restrict domain access to the token

You can use this feature to only allow requests made from certain domain names. Requests not originating from these domain names will be blocked. Note that any subdomain in the whitelisted domain will also be able to make requests.

We INSIST ON USING THIS RESTRICTION because we use JavaScript to make requests to ipinfo.io, so token CAN GET EVERYONE

  1. At the left sidebar click on the "Token";
  2. Scroll down to the "Token Security";
  3. Write your domain to the "Whitelist Referring Domains" list;
  4. Click "Save";
image