veil

Read an oEmbed response

Get an embeddable card or link preview for a supported Veil URL.

GET/oembed
Access
Public; API key optional
Client
Browser fetch supported

Parameters#

NameLocationMeaning
urlRequiredQueryA Veil person, organisation or /v/ verification URL.
formatQueryjson. XML is not supported.
maxwidthQueryOptional maximum width. Below 280 produces a link response.
maxheightQueryOptional maximum height. Below 200 produces a link response.

Request examples#

cURL
curl -fsS 'https://veil.rip/oembed?url=https%3A%2F%2Fveil.rip%2Fo%2Fveil&format=json'
javascript
const response = await fetch("https://veil.rip/oembed?url=https%3A%2F%2Fveil.rip%2Fo%2Fveil&format=json");
const result = await response.json();

Try the request#

Response#

HTTP 200application/json

A card can return type rich with widget HTML, dimensions and thumbnail metadata. Small size limits or verification links return type link.

FieldTypeMeaning
versionstringoEmbed protocol version 1.0.
typestringrich for a card widget; link for verification links or restrictive dimensions.
provider_namestringVeil.
provider_urlstringDirectory base URL.
cache_ageintegerSuggested cache lifetime in seconds.
titlestringReadable title.
author_namestring, optionalDisplay name when known.
author_urlstring, optionalPermanent author card URL.
htmlstring, optionalIframe HTML for type=rich.
widthinteger, optionalWidget width for type=rich.
heightinteger, optionalWidget height for type=rich.
thumbnail_urlstring, optionalServer-rendered card image.
thumbnail_widthinteger, optionalThumbnail width in pixels.
thumbnail_heightinteger, optionalThumbnail height in pixels.

Response headers#

HeaderValueMeaning
Content-Typeapplication/jsonUse the declared media type before choosing a parser.
DateHTTP dateServer time. Compare it with your clock when signing requests.
Cache-Controlpublic, max-age=300Server-rendered previews may be cached for five minutes.
Retry-Afterinteger seconds, on rate_limited or busyWait at least this long before retrying. Other 429/503 codes do not necessarily include it.

Errors#

API errors return an error object. Use error.code for program logic; error.message is English text for people and can change. Response and error guide

HTTPCodeMeaning and next step
400invalid_parameter

A path, query or body field is missing, malformed or outside its accepted range.

Correct the field named in error.message before sending again.

404not_found

The requested card, key, alias, code or resource was not found.

Check the identifier. Temporary codes and previews may already have expired or been used.

501format_not_implemented

Only JSON oEmbed responses are supported.

Request format=json.

When using an optional API key
HTTPCodeMeaning and next step
401invalid_api_key

The bearer credential is malformed, unknown, expired or revoked.

Use an active key. To use anonymous public access, remove Authorization entirely. Invalid credentials never fall back automatically.

403api_key_scope

The API key lacks read or verify scope, or the endpoint does not accept bearer keys.

Use the correct scope. Identity writes and key management still require a device signature.

403api_key_suspended

This API key is suspended.

Ask staff to restore it; another key cannot lift an account suspension.

403developer_suspended

The owner’s API account is suspended or the owner card is unavailable.

Check the owner account and any staff restriction. Creating another key does not bypass suspension.

Shared request errors
HTTPCodeMeaning and next step
429rate_limited

An anonymous, signed-request or API-key allowance was exceeded.

Wait at least Retry-After seconds. Share a queue and retry budget across your workers.

500internal_error

An unexpected server error occurred. Internal details are not returned.

Retry reads with bounded backoff. Check write results before sending a new signed operation.

503busy

The application has reached a temporary concurrency or database limit.

Wait Retry-After seconds and retry with bounded backoff.