GET
/api/{short_code}
Dettaglio URL
Legge un URL tramite il suo short code.
Restituisce i dettagli di un URL. I campi alias, expires_at e max_uses compaiono solo se impostati.
Autenticazione richiesta: header X-Api-Token con il tuo token.
Parametri del percorso
short_code
string
obbligatorio
Lo short code dell'URL.
Risposte
200
URL trovato
{
"success": true,
"data": {
"original_url": "https://example.com/pagina-molto-lunga",
"short_code": "aB3xYz",
"short_url": "https://short.micheleg.me/s/aB3xYz",
"created_at": "2026-01-15 10:30:00",
"alias": "mio-link",
"expires_at": "2026-12-31 23:59:59",
"max_uses": 100
}
}
404
URL inesistente o eliminato
{
"success": false,
"error": "URL not found"
}
curl -X GET "https://short.micheleg.me/api/aB3xYz" \
-H "X-Api-Token: YOUR_API_TOKEN"
const response = await fetch('https://short.micheleg.me/api/aB3xYz', {
method: 'GET',
headers: {
'X-Api-Token': 'YOUR_API_TOKEN'
}
});
const data = await response.json();
console.log(data);
import requests
response = requests.request(
"GET",
"https://short.micheleg.me/api/aB3xYz",
headers={"X-Api-Token": "YOUR_API_TOKEN"}
)
print(response.json())
<?php
$ch = curl_init('https://short.micheleg.me/api/aB3xYz');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'X-Api-Token: YOUR_API_TOKEN',
],
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
Prova
invia una richiesta reale
© 2026 short.micheleg.me