👩💻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
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
Content-Type
true
application/json
apiKey
true
xxxxx-xxxxxxx-xxxxxx
Body
url
string
true
https://example.com/offer?id=123
os
string
true
android or ios or desktop
version
string
true
This is OS version, it should be 13 if you want Android 13 or 17.5 if you want IOS 17.5
country
string
true
it should be two-letter country codes of country, for eg : US, GB
state
string
false
This should be state code, for New York, it should be NY
city
string
false
This should be city name in small characters for eg : newyork
zipcode
string
false
This should be valid zip code, for eg : 10013
isScreenshot
boolean
false
This should be either true or false
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
Was this helpful?