Apariencia de una página
Los colores, fuentes, disposición, logo y banner de una página: los ajustes de su pestaña Apariencia. Una página tiene sus propios ajustes, o sigue un estilo de página: toma entonces la apariencia del estilo, banner incluido. Sus propios ajustes no se pierden: al desvincularla del estilo, los recupera.
- GET
/v1/pages/{id}/styleLeer la apariencia - PATCH
/v1/pages/{id}/styleModificar la apariencia - PATCH
/v1/pages/{id}/styleAplicar o quitar un estilo - PUT
/v1/pages/{id}/logoCambiar el logo - POST
/v1/pages/{id}/logoCambiar el logo - PUT
/v1/pages/{id}/bannerCambiar el banner - POST
/v1/pages/{id}/bannerCambiar el banner - DELETE
/v1/pages/{id}/logoQuitar el logo o el banner - DELETE
/v1/pages/{id}/bannerQuitar el logo o el banner - GET
/v1/fontsListar las fuentes
Leer la apariencia
GET/v1/pages/{id}/style
Los ajustes aplicados a la página (los del estilo si sigue uno), el estilo que sigue (null si no), el banner en sus dos formatos —classic (1200 × 630) y wide (1200 × 400)— y el logo. Ámbito Lectura.
curl https://api.tinylink.fr/v1/pages/P6ad34a0e4fef09/style \
-H "Authorization: Bearer tl_tu_token"
const response = await fetch('https://api.tinylink.fr/v1/pages/P6ad34a0e4fef09/style', {
headers: { Authorization: 'Bearer tl_tu_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_tu_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_tu_token'},
)
data = response.json()
Respuestas posibles
{
"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
} Falta el token en la petición
{
"error": {
"code": "missing_token",
"message": "Send your token in the header: Authorization: Bearer tl_…"
}
} Token desconocido o revocado
{
"error": {
"code": "invalid_token",
"message": "This token does not exist or has been revoked."
}
} El plan del propietario no incluye la 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."
}
} El token no tiene el ámbito Lectura
{
"error": {
"code": "insufficient_scope",
"message": "This token does not have the \"read\" scope.",
"details": {
"required_scope": "read"
}
}
} Ninguna página con este identificador o este slug en el espacio de trabajo
{
"error": {
"code": "not_found",
"message": "Page not found in this environment."
}
} Más de 120 peticiones en el minuto
{
"error": {
"code": "rate_limited",
"message": "Too many requests: 120 per minute per token."
}
} Modificar la apariencia
PATCH/v1/pages/{id}/style
En settings, envía solo los ajustes que cambian; los demás conservan su valor. Un valor rechazado se indica, nunca se sustituye en silencio. Rechazado si la página sigue un estilo: desvincúlala primero. Ámbito Escritura.
header_layout:classic(cabecera de color) obanner(banner arriba);logo_size:small,mediumolargeheader_text_size,button_text_size,section_text_size:small,mediumolargeheader_color,header_title_color,header_description_color,header_icon_color: colores de la cabecerabutton_color,button_title_color,button_description_color: colores de los enlaces;button_radius:circular,roundedosquarebackground_color: fondo de la página;section_title_color,section_description_color: títulos de secciónheader_title_font,header_description_font,button_title_font,button_description_font,section_title_font,section_description_font: identificadores deGET /v1/fonts- Colores en hexadecimal:
#1E90FFo#19F.
curl -X PATCH https://api.tinylink.fr/v1/pages/P6ad34a0e4fef09/style \
-H "Authorization: Bearer tl_tu_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_tu_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_tu_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_tu_token'},
json={
'settings': {
'background_color': '#F3EADF',
'button_color': '#1E90FF',
'button_title_color': '#FFFFFF',
'button_radius': 'circular',
'header_title_font': 'poppinsblack',
},
},
)
data = response.json()
Respuestas posibles
{
"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
} El cuerpo no es un objeto JSON
{
"error": {
"code": "invalid_json",
"message": "The request body must be a JSON object."
}
} Falta el token en la petición
{
"error": {
"code": "missing_token",
"message": "Send your token in the header: Authorization: Bearer tl_…"
}
} Token desconocido o revocado
{
"error": {
"code": "invalid_token",
"message": "This token does not exist or has been revoked."
}
} El plan del propietario no incluye la 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."
}
} El token no tiene el ámbito Escritura
{
"error": {
"code": "insufficient_scope",
"message": "This token does not have the \"write\" scope.",
"details": {
"required_scope": "write"
}
}
} Ninguna página con este identificador o este slug en el espacio de trabajo
{
"error": {
"code": "not_found",
"message": "Page not found in this environment."
}
} La página sigue un estilo de página
{
"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."
}
} Ningún campo modificable en el cuerpo
{
"error": {
"code": "validation_failed",
"message": "Nothing to update. Accepted fields: style_id, keep_appearance, settings."
}
} Ajuste de apariencia desconocido
{
"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"
}
}
} Valor rechazado para un ajuste (color, fuente, lista)
{
"error": {
"code": "validation_failed",
"message": "The \"button_color\" setting must be a hexadecimal colour such as #1E90FF.",
"details": {
"field": "settings.button_color"
}
}
} Elemento bloqueado por la moderación
{
"error": {
"code": "element_blocked",
"message": "This element is blocked by moderation and can no longer be modified."
}
} Más de 120 peticiones en el minuto
{
"error": {
"code": "rate_limited",
"message": "Too many requests: 120 per minute per token."
}
} Aplicar o quitar un estilo
PATCH/v1/pages/{id}/style
style_id vincula la página a un estilo del espacio de trabajo o a un estilo proporcionado (default, light, dark…, ver GET /v1/page-styles). "style_id": null la desvincula: recupera sus propios ajustes; añade "keep_appearance": true para que conserve en cambio la apariencia del estilo, copiada en sus ajustes. Ámbito Escritura.
curl -X PATCH https://api.tinylink.fr/v1/pages/P6ad34a0e4fef09/style \
-H "Authorization: Bearer tl_tu_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_tu_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_tu_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_tu_token'},
json={'style_id': 'PST6ad34a11d00877'},
)
data = response.json()
Respuestas posibles
{
"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"
} El cuerpo no es un objeto JSON
{
"error": {
"code": "invalid_json",
"message": "The request body must be a JSON object."
}
} Falta el token en la petición
{
"error": {
"code": "missing_token",
"message": "Send your token in the header: Authorization: Bearer tl_…"
}
} Token desconocido o revocado
{
"error": {
"code": "invalid_token",
"message": "This token does not exist or has been revoked."
}
} El plan del propietario no incluye la 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."
}
} El token no tiene el ámbito Escritura
{
"error": {
"code": "insufficient_scope",
"message": "This token does not have the \"write\" scope.",
"details": {
"required_scope": "write"
}
}
} Ninguna página con este identificador o este slug en el espacio de trabajo
{
"error": {
"code": "not_found",
"message": "Page not found in this environment."
}
} Estilo ausente del espacio de trabajo
{
"error": {
"code": "validation_failed",
"message": "Unknown page style. Use an id from GET /v1/page-styles.",
"details": {
"field": "style_id"
}
}
} « style_id » y « settings » enviados a la vez
{
"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 bloqueado por la moderación
{
"error": {
"code": "element_blocked",
"message": "This element is blocked by moderation and can no longer be modified."
}
} Más de 120 peticiones en el minuto
{
"error": {
"code": "rate_limited",
"message": "Too many requests: 120 per minute per token."
}
} Cambiar el logo
PUT/v1/pages/{id}/logo
POST/v1/pages/{id}/logo
image: la dirección pública de una imagen, o una data URI en base64 (data:image/png;base64,…). Para enviar un archivo, usa POST en multipart/form-data con un campo image. JPEG, PNG o WebP, 5 MB y 6000 px por lado como máximo. El logo se recorta en un cuadrado de 350 px; crop.square ({"x", "y", "w", "h"}, en píxeles de la imagen original) elige la zona; si no, se centra. La respuesta es la apariencia de la página. Ámbito Escritura.
curl -X PUT https://api.tinylink.fr/v1/pages/P6ad34a0e4fef09/logo \
-H "Authorization: Bearer tl_tu_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_tu_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_tu_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_tu_token'},
json={'image': 'https://exemple.fr/logo.png'},
)
data = response.json()
Respuestas posibles
{
"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"
} El cuerpo no es un objeto JSON
{
"error": {
"code": "invalid_json",
"message": "The request body must be a JSON object."
}
} Falta el token en la petición
{
"error": {
"code": "missing_token",
"message": "Send your token in the header: Authorization: Bearer tl_…"
}
} Token desconocido o revocado
{
"error": {
"code": "invalid_token",
"message": "This token does not exist or has been revoked."
}
} El plan del propietario no incluye la 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."
}
} El token no tiene el ámbito Escritura
{
"error": {
"code": "insufficient_scope",
"message": "This token does not have the \"write\" scope.",
"details": {
"required_scope": "write"
}
}
} Ninguna página con este identificador o este slug en el espacio de trabajo
{
"error": {
"code": "not_found",
"message": "Page not found in this environment."
}
} Imagen ilegible, demasiado pesada o en un formato rechazado
{
"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 bloqueado por la moderación
{
"error": {
"code": "element_blocked",
"message": "This element is blocked by moderation and can no longer be modified."
}
} Más de 120 peticiones en el minuto
{
"error": {
"code": "rate_limited",
"message": "Too many requests: 120 per minute per token."
}
} Cambiar el banner
PUT/v1/pages/{id}/banner
POST/v1/pages/{id}/banner
image: la dirección pública de una imagen, o una data URI en base64 (data:image/png;base64,…). Para enviar un archivo, usa POST en multipart/form-data con un campo image. JPEG, PNG o WebP, 5 MB y 6000 px por lado como máximo. Se generan dos formatos, cada uno con su recorte: crop.classic (1200 × 630) y crop.wide (1200 × 400, disposición banner). Rechazado si la página sigue un estilo: el banner es entonces el del estilo. Según el plan. Ámbito Escritura.
curl -X PUT https://api.tinylink.fr/v1/pages/P6ad34a0e4fef09/banner \
-H "Authorization: Bearer tl_tu_token" \
-H "Content-Type: application/json" \
-d '{"image":"https://ejemplo.es/banner.jpg"}'
const response = await fetch('https://api.tinylink.fr/v1/pages/P6ad34a0e4fef09/banner', {
method: 'PUT',
headers: {
Authorization: 'Bearer tl_tu_token',
'Content-Type': 'application/json',
},
body: JSON.stringify({ image: 'https://ejemplo.es/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_tu_token', 'Content-Type: application/json'],
CURLOPT_POSTFIELDS => json_encode(['image' => 'https://ejemplo.es/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_tu_token'},
json={'image': 'https://ejemplo.es/banner.jpg'},
)
data = response.json()
Respuestas posibles
{
"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"
} El cuerpo no es un objeto JSON
{
"error": {
"code": "invalid_json",
"message": "The request body must be a JSON object."
}
} Falta el token en la petición
{
"error": {
"code": "missing_token",
"message": "Send your token in the header: Authorization: Bearer tl_…"
}
} Token desconocido o revocado
{
"error": {
"code": "invalid_token",
"message": "This token does not exist or has been revoked."
}
} El plan del propietario no incluye los banners
{
"error": {
"code": "plan_feature_unavailable",
"message": "Banners are not included in the plan of this environment's owner."
}
} El plan del propietario no incluye la 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."
}
} El token no tiene el ámbito Escritura
{
"error": {
"code": "insufficient_scope",
"message": "This token does not have the \"write\" scope.",
"details": {
"required_scope": "write"
}
}
} Ninguna página con este identificador o este slug en el espacio de trabajo
{
"error": {
"code": "not_found",
"message": "Page not found in this environment."
}
} La página sigue un estilo de página
{
"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."
}
} Imagen ilegible, demasiado pesada o en un formato rechazado
{
"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 bloqueado por la moderación
{
"error": {
"code": "element_blocked",
"message": "This element is blocked by moderation and can no longer be modified."
}
} Más de 120 peticiones en el minuto
{
"error": {
"code": "rate_limited",
"message": "Too many requests: 120 per minute per token."
}
} Quitar el logo o el banner
DELETE/v1/pages/{id}/logo
DELETE/v1/pages/{id}/banner
Elimina la imagen; la respuesta es la apariencia de la página. No se elimina nada más: basta con el ámbito Escritura.
curl -X DELETE https://api.tinylink.fr/v1/pages/P6ad34a0e4fef09/logo \
-H "Authorization: Bearer tl_tu_token"
const response = await fetch('https://api.tinylink.fr/v1/pages/P6ad34a0e4fef09/logo', {
method: 'DELETE',
headers: { Authorization: 'Bearer tl_tu_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_tu_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_tu_token'},
)
data = response.json()
Respuestas posibles
{
"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
} Falta el token en la petición
{
"error": {
"code": "missing_token",
"message": "Send your token in the header: Authorization: Bearer tl_…"
}
} Token desconocido o revocado
{
"error": {
"code": "invalid_token",
"message": "This token does not exist or has been revoked."
}
} El plan del propietario no incluye la 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."
}
} El token no tiene el ámbito Escritura
{
"error": {
"code": "insufficient_scope",
"message": "This token does not have the \"write\" scope.",
"details": {
"required_scope": "write"
}
}
} Ninguna página con este identificador o este slug en el espacio de trabajo
{
"error": {
"code": "not_found",
"message": "Page not found in this environment."
}
} La página sigue un estilo de página
{
"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 bloqueado por la moderación
{
"error": {
"code": "element_blocked",
"message": "This element is blocked by moderation and can no longer be modified."
}
} Más de 120 peticiones en el minuto
{
"error": {
"code": "rate_limited",
"message": "Too many requests: 120 per minute per token."
}
} Listar las fuentes
GET/v1/fonts
Las fuentes disponibles, por orden alfabético: su id es el valor de los ajustes …_font. Ámbito Lectura.
curl https://api.tinylink.fr/v1/fonts \
-H "Authorization: Bearer tl_tu_token"
const response = await fetch('https://api.tinylink.fr/v1/fonts', {
headers: { Authorization: 'Bearer tl_tu_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_tu_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_tu_token'},
)
data = response.json()
Respuestas posibles
{
"data": [
{
"id": "abrilfat",
"name": "Abril Fatface"
},
{
"id": "bebasneue",
"name": "Bebas Neue"
},
{
"id": "bungee",
"name": "Bungee"
},
{
"id": "caveatreg",
"name": "Caveat Regular"
}
]
} Falta el token en la petición
{
"error": {
"code": "missing_token",
"message": "Send your token in the header: Authorization: Bearer tl_…"
}
} Token desconocido o revocado
{
"error": {
"code": "invalid_token",
"message": "This token does not exist or has been revoked."
}
} El plan del propietario no incluye la 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."
}
} El token no tiene el ámbito Lectura
{
"error": {
"code": "insufficient_scope",
"message": "This token does not have the \"read\" scope.",
"details": {
"required_scope": "read"
}
}
} Más de 120 peticiones en el minuto
{
"error": {
"code": "rate_limited",
"message": "Too many requests: 120 per minute per token."
}
}