Integration Guide

Integration Guide

Refer this page to integrate our URL shortening API with your system. Its really simple and easy to integrate our API, you just need to follow below instructions.

Contact us in case you face any issue while doing integration.


https://api.lnnkin.com/client/api/url/shorten

Name Type Description
long_url String Destination link which you want to short.
NOTE : The long_url must be passed as encoded URL. For example:
Original URL -> https://www.lnnkin.com/api-integration/plans?test=query string
Encoded URL -> https://www.lnnkin.com/api-integration/plans?test=query%20string
custom_name (Optional) String Custom name for short link
password (Optional) String Password for short link

Name Type Description
Content-Type String Content type of the request body. (eg. application/json)
Authorization String API access token of user. It can be found on My Profile page after selecting an API plan.

Name Type Description
success Boolean Its "true" when short link successfully generated else "false".
short_url String Generated short link
track_url String Tracking link for the generated short link.
error_code String Unique code for occurred error.
error_message String Error description for the occured error.

Error code Error message
LI00 Invalid request.
LI01 Per second limit exceeded.
LI02 Monthly limit exceeded.
LI03 Unauthorized access.
LI04 Please select at least one plan from www.lnnkin.com
LI05 Invalid destination link.
LI06 Invalid custom name. Only alphabets, numbers, underscore and hyphen are allowed.
LI07 Custom name already taken. Try something else.
LI08 Unable to generate short URL. Please try again.
LI09 Unable to generate custom URL. Please try again.
LI10 Email not verified.

Sample request & response for SHORT URL

POST https://api.lnnkin.com/client/api/url/shorten
Content-Type:application/json
Authorization:ZPX9blqJm2lJTsYyd9MFiVkb7wsdsudrefvMTz5Ud0UxgbGLua2DCU=
{ 
 "long_url":"https://www.lnnkin.com/api-integration/plans?test=query%20string",
 "password":""
}
{ 
 "success": true,
 "body": {
   "short_url": "http://lnnk.in/EIf",
   "track_url": "https://www.lnnkin.com/url/track/ab2005c2-9c60-4e61-a36e-a44e51c1ede5"
 }
}
{
 "success": false,
 "error_code": "LI05",
 "error_message": "Invalid destination link."
}

Sample request & response for CUSTOM URL

POST https://api.lnnkin.com/client/api/url/shorten
Content-Type:application/json
Authorization:ZPX9blqJm2lJTsYyd9MFiVkb7wsdsudrefvMTz5Ud0UxgbGLua2DCU=
{ 
 "long_url":"https://www.lnnkin.com/api-integration/plans?test=query%20string",
 "custom_name":"API-Test",
 "password":""
}
{ 
 "success": true,
 "body": {
   "short_url": "http://lnnk.in/@API-Test",
   "track_url": "https://www.lnnkin.com/url/track/ab2005c2-9c60-4e61-a36e-a44e51c1ede5"
 }
}
{
 "success": false,
 "error_code": "LI07",
 "error_message": "Custom name already taken. Try something else."
}