Introduction

Here on this page is listed our API documentation for developers who wish to make their own scripts to integrate with safelinking.

All parameters can be sent as either a GET or a POST.

Output will be generated in XML or JSON.

User authentication

Use this API to authenticate a user account so you do not need to store a users safelinking login details in your application - you will only need to store the API hash that is given to you.

API URL
https://safelinking.net/api

PARAMETERS
mode //Should always be set to 'get-api-hash'.
username //Username of the user.
password //Password of the user.
output //output as xml or json - default is xml.

OUTPUT
Outputted in XML TAG api_hash or as JSON.
Errors will be outputted in XML TAG "api_error" or as JSON.


Link Protection API

API URL

https://safelinking.net/api


PARAMETERS

links-to-protect // The links you wish to protect, separated by line breaks. (MANDATORY)
enable-captcha // "on" to enable or "no" to disable.
captcha-type // "Recaptcha" or "Basic+captcha" or "3D+captcha" or "Fancy+captcha" or "QapTcha" or "Simple+Captcha" or "Dotty+Captcha" or "Cool+Captcha" or "Standard+Captcha" or "Cats+Captcha"
link-password // Fill with a password if you want to set one.
link-description //A description of the link.
provider-name //The name of where the links you generate will be posted.
provider-url //The URL of where the links you generate will be posted.
rsdf // "on" if you want to generate a RSDF container file.
dlc // "on" if you want to generate a DLC container file.
rtc // "on" if you want to generate a CCF file.
cnl2 // "on" if you want to generate a CNL2 file.
view-live // "on" if you want to show the live links on the protected page.
show-name // "on" if you want to show pathname or filename in protected links.
individual-links // "on" if you want to create individual protected links for each link submitted.
links-per-mirror // "on" if you want to create protected links for each mirror.
show-short-links // "on" if you want to automatically display all links as shorter sflk.in links.
ip-filter-whitelist //Specify a new line separated list of ips to whitelist access to your link.
ip-filter-blacklist //Specify a new line separated list of ips to blacklist access to your link.
referal-filter-whitelist //Specify a new line separated list of referal domains to whitelist access to your link.
referal-filter-blacklist //Specify a new line separated list of referal domains to blacklist access to your link.
mirror1 // The first set of mirror links to replace main links if they go dead.
mirror2 // The second set of mirror links to replace first mirror links if they go dead.
mirror3 // The third set of mirror links to replace second mirror links if they go dead.
mirror4 // The fourth set of mirror links to replace third mirror links if they go dead.
mirror5 // The fifth set of mirror links to replace fourth mirror links if they go dead.
mirror6 // The sixth set of mirror links to replace fifth mirror links if they go dead.
mirror7 // The seventh set of mirror links to replace sixth mirror links if they go dead.
mirror8 // The eighth set of mirror links to replace seventh mirror links if they go dead.
mirror9 // The ninth set of mirror links to replace eighth mirror links if they go dead.
mirror10 // The tenth set of mirror links to replace ninth mirror links if they go dead.
output // "XML" (default), "JSON" or "raw" (protected links only with no API wrapping) as output type.

If you wish to save the links to a users account you will also need to specify the following parameters:
username //The username of the account where you want to save the links.
api_hash //The users api hash - it can be found in the users control panel or obtained through the API (see user authentication).
use-default-options //Set to 1 to use the default link generation options of the authenticated user - this will override any other settings you specify. Otherwise don't specify this value.


OUTPUT

Protected link(s) in XML TAG "p_links" or as JSON.
Direct link(s) in XML TAG  "d_links" or as JSON.
If specified, container files will be outputted in XML TAG "c_links" or as JSON.
Remove link(s) in XML TAG "r_links" or as JSON.
Errors will be outputted in XML TAG "api_error" or as JSON.


Link Checker API


link // Fill with a "https://safelinking.net/p/[hash]" link. (MANDATORY)
output // Either "XML" (default) or "JSON".


OUTPUT

Either "Online", "Not yet checked", "Broken", "Unknown" or "Offline" in XML TAG "link_status" or as JSON.


EXAMPLE

Open https://safelinking.net/check?link=https://safelinking.net/p/1234567890 in your browser and see the results.

Notice: You can also use our online Link Checker tool.