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.
token name base url
Parameters
| Parameter | Type | Description |
|---|---|---|
tokenName | string | Token name (lowercase) |
baseUrl | string | API base URL |
token name 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