Aspetto di una pagina
I colori, i font, il layout, il logo e il banner di una pagina: le impostazioni della sua scheda Aspetto. Una pagina ha le sue impostazioni, oppure segue uno stile di pagina: prende allora l'aspetto dello stile, banner compreso. Le sue impostazioni non vanno perse: scollegata dallo stile, le ritrova.
- GET
/v1/pages/{id}/styleLeggere l'aspetto - PATCH
/v1/pages/{id}/styleModificare l'aspetto - PATCH
/v1/pages/{id}/styleApplicare o togliere uno stile - PUT
/v1/pages/{id}/logoCambiare il logo - POST
/v1/pages/{id}/logoCambiare il logo - PUT
/v1/pages/{id}/bannerCambiare il banner - POST
/v1/pages/{id}/bannerCambiare il banner - DELETE
/v1/pages/{id}/logoTogliere il logo o il banner - DELETE
/v1/pages/{id}/bannerTogliere il logo o il banner - GET
/v1/fontsElencare i font
Leggere l'aspetto
GET/v1/pages/{id}/style
Le impostazioni applicate alla pagina (quelle dello stile se ne segue uno), lo stile seguito (null altrimenti), il banner nei suoi due formati — classic (1200 × 630) e wide (1200 × 400) — e il logo. Ambito Lettura.
curl https://api.tinylink.fr/v1/pages/P6ad34a0e4fef09/style \
-H "Authorization: Bearer tl_il_tuo_token"
const response = await fetch('https://api.tinylink.fr/v1/pages/P6ad34a0e4fef09/style', {
headers: { Authorization: 'Bearer tl_il_tuo_token' },
});
const data = await response.json();
$ch = curl_init('https://api.tinylink.fr/v1/pages/P6ad34a0e4fef09/style');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Authorization: Bearer tl_il_tuo_token'],
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
import requests
response = requests.get(
'https://api.tinylink.fr/v1/pages/P6ad34a0e4fef09/style',
headers={'Authorization': 'Bearer tl_il_tuo_token'},
)
data = response.json()
Risposte possibili
{
"page_id": "P6ad34a0e4fef09",
"style": null,
"settings": {
"header_layout": "classic",
"logo_size": "medium",
"header_text_size": "medium",
"header_color": "#212121",
"header_title_color": "#FFFFFF",
"header_description_color": "#D8D8D8",
"header_icon_color": "#FFFFFF",
"header_title_font": "metroblack",
"header_description_font": "robotoreg",
"button_text_size": "medium",
"button_color": "#FFFFFF",
"button_title_color": "#212121",
"button_description_color": "#888888",
"button_title_font": "robotoreg",
"button_description_font": "robotoreg",
"button_radius": "rounded",
"background_color": "#F0F0F0",
"section_text_size": "medium",
"section_title_color": "#212121",
"section_title_font": "robotobold",
"section_description_color": "#888888",
"section_description_font": "robotoreg"
},
"banner": null,
"logo": null
} Token assente dalla richiesta
{
"error": {
"code": "missing_token",
"message": "Send your token in the header: Authorization: Bearer tl_…"
}
} Token sconosciuto o revocato
{
"error": {
"code": "invalid_token",
"message": "This token does not exist or has been revoked."
}
} Il piano del proprietario non include l'API
{
"error": {
"code": "plan_required",
"message": "The TinyLink API is included in the Pro and Business plans. Upgrade the plan of this environment's owner to use it."
}
} Il token non ha l'ambito Lettura
{
"error": {
"code": "insufficient_scope",
"message": "This token does not have the \"read\" scope.",
"details": {
"required_scope": "read"
}
}
} Nessuna pagina con questo identificativo o questo slug nello spazio di lavoro
{
"error": {
"code": "not_found",
"message": "Page not found in this environment."
}
} Più di 120 richieste nel minuto
{
"error": {
"code": "rate_limited",
"message": "Too many requests: 120 per minute per token."
}
} Modificare l'aspetto
PATCH/v1/pages/{id}/style
In settings, invia solo le impostazioni da cambiare; le altre mantengono il loro valore. Un valore rifiutato viene segnalato, mai sostituito in silenzio. Rifiutato se la pagina segue uno stile: scollegala prima. Ambito Scrittura.
header_layout:classic(intestazione colorata) obanner(banner in alto);logo_size:small,mediumolargeheader_text_size,button_text_size,section_text_size:small,mediumolargeheader_color,header_title_color,header_description_color,header_icon_color: colori dell'intestazionebutton_color,button_title_color,button_description_color: colori dei link;button_radius:circular,roundedosquarebackground_color: sfondo della pagina;section_title_color,section_description_color: titoli di sezioneheader_title_font,header_description_font,button_title_font,button_description_font,section_title_font,section_description_font: identificativi diGET /v1/fonts- Colori in esadecimale:
#1E90FFo#19F.
curl -X PATCH https://api.tinylink.fr/v1/pages/P6ad34a0e4fef09/style \
-H "Authorization: Bearer tl_il_tuo_token" \
-H "Content-Type: application/json" \
-d '{
"settings": {
"background_color": "#F3EADF",
"button_color": "#1E90FF",
"button_title_color": "#FFFFFF",
"button_radius": "circular",
"header_title_font": "poppinsblack"
}
}'
const response = await fetch('https://api.tinylink.fr/v1/pages/P6ad34a0e4fef09/style', {
method: 'PATCH',
headers: {
Authorization: 'Bearer tl_il_tuo_token',
'Content-Type': 'application/json',
},
body: JSON.stringify({
settings: {
background_color: '#F3EADF',
button_color: '#1E90FF',
button_title_color: '#FFFFFF',
button_radius: 'circular',
header_title_font: 'poppinsblack',
},
}),
});
const data = await response.json();
$ch = curl_init('https://api.tinylink.fr/v1/pages/P6ad34a0e4fef09/style');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'PATCH',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Authorization: Bearer tl_il_tuo_token', 'Content-Type: application/json'],
CURLOPT_POSTFIELDS => json_encode([
'settings' => [
'background_color' => '#F3EADF',
'button_color' => '#1E90FF',
'button_title_color' => '#FFFFFF',
'button_radius' => 'circular',
'header_title_font' => 'poppinsblack',
],
]),
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
import requests
response = requests.patch(
'https://api.tinylink.fr/v1/pages/P6ad34a0e4fef09/style',
headers={'Authorization': 'Bearer tl_il_tuo_token'},
json={
'settings': {
'background_color': '#F3EADF',
'button_color': '#1E90FF',
'button_title_color': '#FFFFFF',
'button_radius': 'circular',
'header_title_font': 'poppinsblack',
},
},
)
data = response.json()
Risposte possibili
{
"page_id": "P6ad34a0e4fef09",
"style": null,
"settings": {
"header_layout": "classic",
"logo_size": "medium",
"header_text_size": "medium",
"header_color": "#212121",
"header_title_color": "#FFFFFF",
"header_description_color": "#D8D8D8",
"header_icon_color": "#FFFFFF",
"header_title_font": "poppinsblack",
"header_description_font": "robotoreg",
"button_text_size": "medium",
"button_color": "#1E90FF",
"button_title_color": "#FFFFFF",
"button_description_color": "#888888",
"button_title_font": "robotoreg",
"button_description_font": "robotoreg",
"button_radius": "circular",
"background_color": "#F3EADF",
"section_text_size": "medium",
"section_title_color": "#212121",
"section_title_font": "robotobold",
"section_description_color": "#888888",
"section_description_font": "robotoreg"
},
"banner": null,
"logo": null
} Il corpo non è un oggetto JSON
{
"error": {
"code": "invalid_json",
"message": "The request body must be a JSON object."
}
} Token assente dalla richiesta
{
"error": {
"code": "missing_token",
"message": "Send your token in the header: Authorization: Bearer tl_…"
}
} Token sconosciuto o revocato
{
"error": {
"code": "invalid_token",
"message": "This token does not exist or has been revoked."
}
} Il piano del proprietario non include l'API
{
"error": {
"code": "plan_required",
"message": "The TinyLink API is included in the Pro and Business plans. Upgrade the plan of this environment's owner to use it."
}
} Il token non ha l'ambito Scrittura
{
"error": {
"code": "insufficient_scope",
"message": "This token does not have the \"write\" scope.",
"details": {
"required_scope": "write"
}
}
} Nessuna pagina con questo identificativo o questo slug nello spazio di lavoro
{
"error": {
"code": "not_found",
"message": "Page not found in this environment."
}
} La pagina segue uno stile di pagina
{
"error": {
"code": "page_style_linked",
"message": "This page follows the page style \"Dark\": its appearance comes from the style. Unlink it first with PATCH /v1/pages/{id}/style and \"style_id\": null, or edit the style."
}
} Nessun campo modificabile nel corpo
{
"error": {
"code": "validation_failed",
"message": "Nothing to update. Accepted fields: style_id, keep_appearance, settings."
}
} Impostazione di aspetto sconosciuta
{
"error": {
"code": "validation_failed",
"message": "Unknown setting \"shadow\". Accepted: header_layout, logo_size, header_text_size, header_color, header_title_color, header_description_color, header_icon_color, header_title_font, header_description_font, button_text_size, button_color, button_title_color, button_description_color, button_title_font, button_description_font, button_radius, background_color, section_text_size, section_title_color, section_title_font, section_description_color, section_description_font.",
"details": {
"field": "settings.shadow"
}
}
} Valore rifiutato per un'impostazione (colore, font, elenco)
{
"error": {
"code": "validation_failed",
"message": "The \"button_color\" setting must be a hexadecimal colour such as #1E90FF.",
"details": {
"field": "settings.button_color"
}
}
} Elemento bloccato dalla moderazione
{
"error": {
"code": "element_blocked",
"message": "This element is blocked by moderation and can no longer be modified."
}
} Più di 120 richieste nel minuto
{
"error": {
"code": "rate_limited",
"message": "Too many requests: 120 per minute per token."
}
} Applicare o togliere uno stile
PATCH/v1/pages/{id}/style
style_id collega la pagina a uno stile dello spazio di lavoro o a uno stile fornito (default, light, dark…, vedi GET /v1/page-styles). "style_id": null la scollega: ritrova le sue impostazioni; aggiungi "keep_appearance": true perché mantenga invece l'aspetto dello stile, copiato nelle sue impostazioni. Ambito Scrittura.
curl -X PATCH https://api.tinylink.fr/v1/pages/P6ad34a0e4fef09/style \
-H "Authorization: Bearer tl_il_tuo_token" \
-H "Content-Type: application/json" \
-d '{"style_id":"PST6ad34a11d00877"}'
const response = await fetch('https://api.tinylink.fr/v1/pages/P6ad34a0e4fef09/style', {
method: 'PATCH',
headers: {
Authorization: 'Bearer tl_il_tuo_token',
'Content-Type': 'application/json',
},
body: JSON.stringify({ style_id: 'PST6ad34a11d00877' }),
});
const data = await response.json();
$ch = curl_init('https://api.tinylink.fr/v1/pages/P6ad34a0e4fef09/style');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'PATCH',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Authorization: Bearer tl_il_tuo_token', 'Content-Type: application/json'],
CURLOPT_POSTFIELDS => json_encode(['style_id' => 'PST6ad34a11d00877']),
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
import requests
response = requests.patch(
'https://api.tinylink.fr/v1/pages/P6ad34a0e4fef09/style',
headers={'Authorization': 'Bearer tl_il_tuo_token'},
json={'style_id': 'PST6ad34a11d00877'},
)
data = response.json()
Risposte possibili
{
"page_id": "P6ad34a0e4fef09",
"style": {
"id": "PST6ad34a11d00877",
"name": "Charte 2026",
"builtin": false
},
"settings": {
"header_layout": "classic",
"logo_size": "medium",
"header_text_size": "medium",
"header_color": "#212121",
"header_title_color": "#FFFFFF",
"header_description_color": "#D8D8D8",
"header_icon_color": "#FFFFFF",
"header_title_font": "metroblack",
"header_description_font": "robotoreg",
"button_text_size": "medium",
"button_color": "#1E90FF",
"button_title_color": "#FFFFFF",
"button_description_color": "#888888",
"button_title_font": "robotoreg",
"button_description_font": "robotoreg",
"button_radius": "circular",
"background_color": "#F0F0F0",
"section_text_size": "medium",
"section_title_color": "#212121",
"section_title_font": "robotobold",
"section_description_color": "#888888",
"section_description_font": "robotoreg"
},
"banner": null,
"logo": "https://content.tinylink.fr/page-logo/logo_6ad34a0fd937d.webp"
} Il corpo non è un oggetto JSON
{
"error": {
"code": "invalid_json",
"message": "The request body must be a JSON object."
}
} Token assente dalla richiesta
{
"error": {
"code": "missing_token",
"message": "Send your token in the header: Authorization: Bearer tl_…"
}
} Token sconosciuto o revocato
{
"error": {
"code": "invalid_token",
"message": "This token does not exist or has been revoked."
}
} Il piano del proprietario non include l'API
{
"error": {
"code": "plan_required",
"message": "The TinyLink API is included in the Pro and Business plans. Upgrade the plan of this environment's owner to use it."
}
} Il token non ha l'ambito Scrittura
{
"error": {
"code": "insufficient_scope",
"message": "This token does not have the \"write\" scope.",
"details": {
"required_scope": "write"
}
}
} Nessuna pagina con questo identificativo o questo slug nello spazio di lavoro
{
"error": {
"code": "not_found",
"message": "Page not found in this environment."
}
} Stile assente dallo spazio di lavoro
{
"error": {
"code": "validation_failed",
"message": "Unknown page style. Use an id from GET /v1/page-styles.",
"details": {
"field": "style_id"
}
}
} « style_id » e « settings » inviati insieme
{
"error": {
"code": "validation_failed",
"message": "Send either \"style_id\" or \"settings\": a page that follows a style takes its appearance from the style.",
"details": {
"field": "settings"
}
}
} Elemento bloccato dalla moderazione
{
"error": {
"code": "element_blocked",
"message": "This element is blocked by moderation and can no longer be modified."
}
} Più di 120 richieste nel minuto
{
"error": {
"code": "rate_limited",
"message": "Too many requests: 120 per minute per token."
}
} Cambiare il logo
PUT/v1/pages/{id}/logo
POST/v1/pages/{id}/logo
image: l'indirizzo pubblico di un'immagine, o una data URI in base64 (data:image/png;base64,…). Per inviare un file, usa POST in multipart/form-data con un campo image. JPEG, PNG o WebP, 5 MB e 6000 px per lato al massimo. Il logo viene ritagliato in un quadrato di 350 px; crop.square ({"x", "y", "w", "h"}, in pixel dell'immagine originale) sceglie la zona, altrimenti è centrata. La risposta è l'aspetto della pagina. Ambito Scrittura.
curl -X PUT https://api.tinylink.fr/v1/pages/P6ad34a0e4fef09/logo \
-H "Authorization: Bearer tl_il_tuo_token" \
-H "Content-Type: application/json" \
-d '{"image":"https://exemple.fr/logo.png"}'
const response = await fetch('https://api.tinylink.fr/v1/pages/P6ad34a0e4fef09/logo', {
method: 'PUT',
headers: {
Authorization: 'Bearer tl_il_tuo_token',
'Content-Type': 'application/json',
},
body: JSON.stringify({ image: 'https://exemple.fr/logo.png' }),
});
const data = await response.json();
$ch = curl_init('https://api.tinylink.fr/v1/pages/P6ad34a0e4fef09/logo');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Authorization: Bearer tl_il_tuo_token', 'Content-Type: application/json'],
CURLOPT_POSTFIELDS => json_encode(['image' => 'https://exemple.fr/logo.png']),
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
import requests
response = requests.put(
'https://api.tinylink.fr/v1/pages/P6ad34a0e4fef09/logo',
headers={'Authorization': 'Bearer tl_il_tuo_token'},
json={'image': 'https://exemple.fr/logo.png'},
)
data = response.json()
Risposte possibili
{
"page_id": "P6ad34a0e4fef09",
"style": null,
"settings": {
"header_layout": "classic",
"logo_size": "medium",
"header_text_size": "medium",
"header_color": "#212121",
"header_title_color": "#FFFFFF",
"header_description_color": "#D8D8D8",
"header_icon_color": "#FFFFFF",
"header_title_font": "poppinsblack",
"header_description_font": "robotoreg",
"button_text_size": "medium",
"button_color": "#1E90FF",
"button_title_color": "#FFFFFF",
"button_description_color": "#888888",
"button_title_font": "robotoreg",
"button_description_font": "robotoreg",
"button_radius": "circular",
"background_color": "#F3EADF",
"section_text_size": "medium",
"section_title_color": "#212121",
"section_title_font": "robotobold",
"section_description_color": "#888888",
"section_description_font": "robotoreg"
},
"banner": null,
"logo": "https://content.tinylink.fr/page-logo/logo_6ad34a0fd937d.webp"
} Il corpo non è un oggetto JSON
{
"error": {
"code": "invalid_json",
"message": "The request body must be a JSON object."
}
} Token assente dalla richiesta
{
"error": {
"code": "missing_token",
"message": "Send your token in the header: Authorization: Bearer tl_…"
}
} Token sconosciuto o revocato
{
"error": {
"code": "invalid_token",
"message": "This token does not exist or has been revoked."
}
} Il piano del proprietario non include l'API
{
"error": {
"code": "plan_required",
"message": "The TinyLink API is included in the Pro and Business plans. Upgrade the plan of this environment's owner to use it."
}
} Il token non ha l'ambito Scrittura
{
"error": {
"code": "insufficient_scope",
"message": "This token does not have the \"write\" scope.",
"details": {
"required_scope": "write"
}
}
} Nessuna pagina con questo identificativo o questo slug nello spazio di lavoro
{
"error": {
"code": "not_found",
"message": "Page not found in this environment."
}
} Immagine illeggibile, troppo pesante o in un formato rifiutato
{
"error": {
"code": "invalid_image",
"message": "The image could not be used: send a JPEG, PNG or WebP image (5 MB and 6000 px per side at most) as a public address, a base64 data URI, or a file sent with POST as multipart/form-data.",
"details": {
"field": "image"
}
}
} Elemento bloccato dalla moderazione
{
"error": {
"code": "element_blocked",
"message": "This element is blocked by moderation and can no longer be modified."
}
} Più di 120 richieste nel minuto
{
"error": {
"code": "rate_limited",
"message": "Too many requests: 120 per minute per token."
}
} Cambiare il banner
PUT/v1/pages/{id}/banner
POST/v1/pages/{id}/banner
image: l'indirizzo pubblico di un'immagine, o una data URI in base64 (data:image/png;base64,…). Per inviare un file, usa POST in multipart/form-data con un campo image. JPEG, PNG o WebP, 5 MB e 6000 px per lato al massimo. Vengono prodotti due formati, ciascuno con il suo ritaglio: crop.classic (1200 × 630) e crop.wide (1200 × 400, layout banner). Rifiutato se la pagina segue uno stile: il banner è allora quello dello stile. In base al piano. Ambito Scrittura.
curl -X PUT https://api.tinylink.fr/v1/pages/P6ad34a0e4fef09/banner \
-H "Authorization: Bearer tl_il_tuo_token" \
-H "Content-Type: application/json" \
-d '{"image":"https://esempio.it/banner.jpg"}'
const response = await fetch('https://api.tinylink.fr/v1/pages/P6ad34a0e4fef09/banner', {
method: 'PUT',
headers: {
Authorization: 'Bearer tl_il_tuo_token',
'Content-Type': 'application/json',
},
body: JSON.stringify({ image: 'https://esempio.it/banner.jpg' }),
});
const data = await response.json();
$ch = curl_init('https://api.tinylink.fr/v1/pages/P6ad34a0e4fef09/banner');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Authorization: Bearer tl_il_tuo_token', 'Content-Type: application/json'],
CURLOPT_POSTFIELDS => json_encode(['image' => 'https://esempio.it/banner.jpg']),
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
import requests
response = requests.put(
'https://api.tinylink.fr/v1/pages/P6ad34a0e4fef09/banner',
headers={'Authorization': 'Bearer tl_il_tuo_token'},
json={'image': 'https://esempio.it/banner.jpg'},
)
data = response.json()
Risposte possibili
{
"page_id": "P6ad34a0e4fef09",
"style": null,
"settings": {
"header_layout": "classic",
"logo_size": "medium",
"header_text_size": "medium",
"header_color": "#212121",
"header_title_color": "#FFFFFF",
"header_description_color": "#D8D8D8",
"header_icon_color": "#FFFFFF",
"header_title_font": "poppinsblack",
"header_description_font": "robotoreg",
"button_text_size": "medium",
"button_color": "#1E90FF",
"button_title_color": "#FFFFFF",
"button_description_color": "#888888",
"button_title_font": "robotoreg",
"button_description_font": "robotoreg",
"button_radius": "circular",
"background_color": "#F3EADF",
"section_text_size": "medium",
"section_title_color": "#212121",
"section_title_font": "robotobold",
"section_description_color": "#888888",
"section_description_font": "robotoreg"
},
"banner": {
"classic": "https://content.tinylink.fr/page-banner/banner_6ad34a102be89.webp",
"wide": "https://content.tinylink.fr/page-banner/wide_banner_6ad34a102be89.webp"
},
"logo": "https://content.tinylink.fr/page-logo/logo_6ad34a0fd937d.webp"
} Il corpo non è un oggetto JSON
{
"error": {
"code": "invalid_json",
"message": "The request body must be a JSON object."
}
} Token assente dalla richiesta
{
"error": {
"code": "missing_token",
"message": "Send your token in the header: Authorization: Bearer tl_…"
}
} Token sconosciuto o revocato
{
"error": {
"code": "invalid_token",
"message": "This token does not exist or has been revoked."
}
} Il piano del proprietario non include i banner
{
"error": {
"code": "plan_feature_unavailable",
"message": "Banners are not included in the plan of this environment's owner."
}
} Il piano del proprietario non include l'API
{
"error": {
"code": "plan_required",
"message": "The TinyLink API is included in the Pro and Business plans. Upgrade the plan of this environment's owner to use it."
}
} Il token non ha l'ambito Scrittura
{
"error": {
"code": "insufficient_scope",
"message": "This token does not have the \"write\" scope.",
"details": {
"required_scope": "write"
}
}
} Nessuna pagina con questo identificativo o questo slug nello spazio di lavoro
{
"error": {
"code": "not_found",
"message": "Page not found in this environment."
}
} La pagina segue uno stile di pagina
{
"error": {
"code": "page_style_linked",
"message": "This page follows the page style \"Dark\": its appearance comes from the style. Unlink it first with PATCH /v1/pages/{id}/style and \"style_id\": null, or edit the style."
}
} Immagine illeggibile, troppo pesante o in un formato rifiutato
{
"error": {
"code": "invalid_image",
"message": "The image could not be used: send a JPEG, PNG or WebP image (5 MB and 6000 px per side at most) as a public address, a base64 data URI, or a file sent with POST as multipart/form-data.",
"details": {
"field": "image"
}
}
} Elemento bloccato dalla moderazione
{
"error": {
"code": "element_blocked",
"message": "This element is blocked by moderation and can no longer be modified."
}
} Più di 120 richieste nel minuto
{
"error": {
"code": "rate_limited",
"message": "Too many requests: 120 per minute per token."
}
} Togliere il logo o il banner
DELETE/v1/pages/{id}/logo
DELETE/v1/pages/{id}/banner
Elimina l'immagine; la risposta è l'aspetto della pagina. Nient'altro viene eliminato: basta l'ambito Scrittura.
curl -X DELETE https://api.tinylink.fr/v1/pages/P6ad34a0e4fef09/logo \
-H "Authorization: Bearer tl_il_tuo_token"
const response = await fetch('https://api.tinylink.fr/v1/pages/P6ad34a0e4fef09/logo', {
method: 'DELETE',
headers: { Authorization: 'Bearer tl_il_tuo_token' },
});
const data = await response.json();
$ch = curl_init('https://api.tinylink.fr/v1/pages/P6ad34a0e4fef09/logo');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Authorization: Bearer tl_il_tuo_token'],
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
import requests
response = requests.delete(
'https://api.tinylink.fr/v1/pages/P6ad34a0e4fef09/logo',
headers={'Authorization': 'Bearer tl_il_tuo_token'},
)
data = response.json()
Risposte possibili
{
"page_id": "P6ad34a0e4fef09",
"style": null,
"settings": {
"header_layout": "classic",
"logo_size": "medium",
"header_text_size": "medium",
"header_color": "#212121",
"header_title_color": "#FFFFFF",
"header_description_color": "#D8D8D8",
"header_icon_color": "#FFFFFF",
"header_title_font": "metroblack",
"header_description_font": "robotoreg",
"button_text_size": "medium",
"button_color": "#FFFFFF",
"button_title_color": "#212121",
"button_description_color": "#888888",
"button_title_font": "robotoreg",
"button_description_font": "robotoreg",
"button_radius": "rounded",
"background_color": "#F0F0F0",
"section_text_size": "medium",
"section_title_color": "#212121",
"section_title_font": "robotobold",
"section_description_color": "#888888",
"section_description_font": "robotoreg"
},
"banner": null,
"logo": null
} Token assente dalla richiesta
{
"error": {
"code": "missing_token",
"message": "Send your token in the header: Authorization: Bearer tl_…"
}
} Token sconosciuto o revocato
{
"error": {
"code": "invalid_token",
"message": "This token does not exist or has been revoked."
}
} Il piano del proprietario non include l'API
{
"error": {
"code": "plan_required",
"message": "The TinyLink API is included in the Pro and Business plans. Upgrade the plan of this environment's owner to use it."
}
} Il token non ha l'ambito Scrittura
{
"error": {
"code": "insufficient_scope",
"message": "This token does not have the \"write\" scope.",
"details": {
"required_scope": "write"
}
}
} Nessuna pagina con questo identificativo o questo slug nello spazio di lavoro
{
"error": {
"code": "not_found",
"message": "Page not found in this environment."
}
} La pagina segue uno stile di pagina
{
"error": {
"code": "page_style_linked",
"message": "This page follows the page style \"Dark\": its appearance comes from the style. Unlink it first with PATCH /v1/pages/{id}/style and \"style_id\": null, or edit the style."
}
} Elemento bloccato dalla moderazione
{
"error": {
"code": "element_blocked",
"message": "This element is blocked by moderation and can no longer be modified."
}
} Più di 120 richieste nel minuto
{
"error": {
"code": "rate_limited",
"message": "Too many requests: 120 per minute per token."
}
} Elencare i font
GET/v1/fonts
I font disponibili, in ordine alfabetico: il loro id è il valore delle impostazioni …_font. Ambito Lettura.
curl https://api.tinylink.fr/v1/fonts \
-H "Authorization: Bearer tl_il_tuo_token"
const response = await fetch('https://api.tinylink.fr/v1/fonts', {
headers: { Authorization: 'Bearer tl_il_tuo_token' },
});
const data = await response.json();
$ch = curl_init('https://api.tinylink.fr/v1/fonts');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Authorization: Bearer tl_il_tuo_token'],
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
import requests
response = requests.get(
'https://api.tinylink.fr/v1/fonts',
headers={'Authorization': 'Bearer tl_il_tuo_token'},
)
data = response.json()
Risposte possibili
{
"data": [
{
"id": "abrilfat",
"name": "Abril Fatface"
},
{
"id": "bebasneue",
"name": "Bebas Neue"
},
{
"id": "bungee",
"name": "Bungee"
},
{
"id": "caveatreg",
"name": "Caveat Regular"
}
]
} Token assente dalla richiesta
{
"error": {
"code": "missing_token",
"message": "Send your token in the header: Authorization: Bearer tl_…"
}
} Token sconosciuto o revocato
{
"error": {
"code": "invalid_token",
"message": "This token does not exist or has been revoked."
}
} Il piano del proprietario non include l'API
{
"error": {
"code": "plan_required",
"message": "The TinyLink API is included in the Pro and Business plans. Upgrade the plan of this environment's owner to use it."
}
} Il token non ha l'ambito Lettura
{
"error": {
"code": "insufficient_scope",
"message": "This token does not have the \"read\" scope.",
"details": {
"required_scope": "read"
}
}
} Più di 120 richieste nel minuto
{
"error": {
"code": "rate_limited",
"message": "Too many requests: 120 per minute per token."
}
}