👩‍💻Start with API

Our API is simple to start with, Utilize this api to test your tracking link direcly on your servers, this API is ment for server-to-server, so make sure you don't use this on client side (browser).

Start Testing

Note : You can follow this guide to grab your API Keys, click here

Base endpoint : https://verifylink.io

Create a request

POST /api/v1

The request should be a POST with the appropriate headers and body in raw format.

Headers

Body

Note : If you set "isScreenshot" to true, each request will cost 10 credits. Only enable this option if necessary.

Response

{
    "message": "Process completed",
    "redirectUrls": [
        "https://surl.li/twxos",
        "http://surl.li/twxos",
        "https://bitly.cx/AB4W",
        "https://shorturl.at/2E86Q",
        "https://www.shorturl.at/2E86Q",
        "https://verifylink.io/"
    ],
    "screenshots": [],
    "statusCodes": [
        307,
        301,
        301,
        302,
        301,
        302
    ],
    "content": "<!DOCTYPE html><html lang=\"en\" class=\"nprogress-busy\" style=\"\"><head><meta charset=\"utf-8\"><meta name=\"viewport\" content=\"width=device-width\"><link rel=\"icon\" type=\"image/png\" href=\"/assets/images/site/favicon.png\"><meta name=\"title\" content=\"verifylink.io\"><meta name=\"description\" content=\"Verfiylink.io is the affiliate link testing application for affiliate marketers to test affiliate links based on various criteria like geolocation, device etc.\"><meta name=\"keywords\" content=\"link testing pla",
    "serverfailure": false,
    "destination": "website"
}

Examples

const https = require('https');

const data = JSON.stringify({
    url: 'https://surl.li/twxos',
    os: 'ios',
    version: '17.5',
    country: 'US'
});

const options = {
    hostname: 'verifylink.io',
    port: 443,
    path: '/api/v1',
    method: 'POST',
    headers: {
        'Content-Type': 'application/json',
        'apiKey': 'xxxxx-xxxxxxx-xxxxxx'
    }
};

const req = https.request(options, (res) => {
    let responseData = '';

    res.on('data', (chunk) => {
        responseData += chunk;
    });

    res.on('end', () => {
        try {
            const jsonResponse = JSON.parse(responseData);
            console.log('Message:', jsonResponse.message);
            console.log('Redirect URLs:', jsonResponse.redirectUrls);
            console.log('Screenshots:', jsonResponse.screenshots);
            console.log('Status Codes:', jsonResponse.statusCodes);
            console.log('Content:', jsonResponse.content.substring(0, 200) + '...'); // Print first 200 characters
            console.log('Server Failure:', jsonResponse.serverfailure);
            console.log('Destination:', jsonResponse.destination);
        } catch (error) {
            console.error('Error parsing response:', error);
        }
    });
});

req.on('error', (error) => {
    console.error('Error:', error);
});

req.write(data);
req.end();

Last updated