Create short links automatically by sending a GET request with a valid URL.
Endpoint
GET /api.php?link=
Example Request
https://domain.com/api.php?link=https://example.com
Success Response
{
"success": true,
"id": 123,
"original_url": "https://example.com",
"short_url": "https://domain.com/123"
}
Error Responses
{
"success": false,
"error": "Missing link parameter"
}
{
"success": false,
"error": "Invalid URL"
}
Notes
- The link parameter must be a valid URL beginning with http:// or https://.
- The API does not require admin login.
- The API returns JSON only.