Skip to main content

index/functions/getTokenPosterUrl.md

getTokenPosterUrl(tokenName, baseUrl): string

Get redirect URL for a token poster image

High-quality still frame used for previewing video/stream content. Typically the first frame or a key frame from the stream.

Backend: Redirects to Mux poster image if stream is recorded, otherwise placeholder.

Parameters​

ParameterTypeDescription
tokenNamestringToken name (lowercase)
baseUrlstringAPI base URL

Returns​

string

Full redirect URL to token poster

Throws​

Error if token name is invalid or empty

Example​

const posterUrl = getTokenPosterUrl('anime', 'https://api.example.com');
// → "https://api.example.com/v1/tokens/anime/assets/poster.jpg"

Since​

7.3.0