TentoCMS
Interfaces

Interface: TentoClientConfig

Configuration options for TentoClient

Configuration options for TentoClient

Properties

PropertyTypeDescription
apiKeystringAPI key for authentication: tento_pk_*, tento_sk_*, or preview_*. A preview_* key authenticates on its own AND grants draft access, so it is the only credential a preview integration needs — pass { preview: true } per request to ask for drafts. Such a key is read-only and never serves drafts unless asked, so the same client can fetch live content too.
baseUrl?stringBase URL of the TentoCMS API (default: https://tento-api.intelligentlending.co.uk)
fetch?(input, init?) => Promise<Response>Custom fetch implementation for SSR/edge environments
previewKey?stringPreview key for accessing draft content (preview_*), alongside a production apiKey. Deprecated Pass the preview key as apiKey instead. A preview key now authenticates by itself, so the two-credential form is no longer needed. It remains supported and is sent as the X-Preview-Key header (previously ?preview=<key>, which put a secret in the query string, where it reaches access logs, referrers and cache keys). Ignored when apiKey is itself a preview_* key.
timeout?numberRequest timeout in milliseconds (default: 30000)
Copyright © 2026