Skip to content
Docs
Reference

Interface: ServerClientOptions

Interface: ServerClientOptions in @ticketlayer/live.

@ticketlayer/live


@ticketlayer/live / server / ServerClientOptions

Defined in: server.ts:49

Properties#

apiUrl#

apiUrl: string;

Defined in: server.ts:51

Base URL of the Live API (server-side/internal host is fine).


apiVersion?#

optional apiVersion?: string;

Defined in: server.ts:65

Override the dated API version sent as TL-Version.


cache?#

optional cache?: false | ServerCacheOptions;

Defined in: server.ts:61

In-memory response cache. false disables it. Default: 60s TTL.


channelKey?#

optional channelKey?: string;

Defined in: server.ts:55

Alias of publishableKey, matching the /session body field name.


credentialTtlMs?#

optional credentialTtlMs?: number;

Defined in: server.ts:63

How long a domain-resolved publishable key is kept. Default 10 minutes.


domain?#

optional domain?: string;

Defined in: server.ts:57

Hosted style: resolve the channel by storefront domain instead of a key.


fetch?#

optional fetch?: FetchLike;

Defined in: server.ts:59

fetch implementation; defaults to the global fetch (Node 18+).


publishableKey?#

optional publishableKey?: string;

Defined in: server.ts:53

Embed style: the channel publishable key (tlpk_...).


requestInit?#

optional requestInit?: RequestInit;

Defined in: server.ts:76

RequestInit merged into every request (headers are merged, not replaced).


userAgent?#

optional userAgent?: string;

Defined in: server.ts:74

Override the User-Agent header.

Defaults to the same identity this client sends as TL-Client, so a request names its SDK whether the server reads one header or the other. TL-Client always identifies this SDK regardless of what is set here, so a caller who names their own program does not hide which SDK build made the call.