Preventing Free Trial Abuse

Ipregistry might be used to protect your app from trial abuse or from users trying to get around country restrictions by using Tor or proxies.

Below is a Javascript code snippet that could be used to forbid account creation to anonymous users (i.e. users detected as using Tor or a proxy):

fetch('https://api.ipregistry.co/?key=YOUR_API_KEY')
    .then(function (response) { return response.json(); })
    .then(function (payload) {
        const isAnonymous = payload['security']['is_anonymous'];
        if (isAnonymous) {
            // Prevent user to sign up or require a credit card
        }
    });

You might also choose to allow Tor users through and only block users using proxies:

fetch('https://api.ipregistry.co/?key=YOUR_API_KEY')
    .then(function (response) { return response.json(); })
    .then(function (payload) {
        const isProxy = payload['security']['is_proxy'];
        if (isProxy) {
            // Prevent user to sign up or require a credit card
        }
    });

Ipregistry also offers the option of blocking users whose IP's have been reported repeatedly by admins across the Internet for malicious activity or spam. For this purpose, you can respectively use the fields is_attacker and is_abuser.