Skip to content

Function: mintToken() ​

ts
function mintToken(opts): Promise<string>;

Mints an access token. This is what @talkline/server-sdk exposes and what a tenant on PHP or Python reimplements with its own JWT library — the claim set above is the contract.

Signs locally, with no network call. It throws an AuthError only for options no token may carry, so a throw is a bug in the caller, never an outage: token_ttl_too_long for a ttlSec outside 1–600, unauthenticated for an empty identity, permission_denied for metadata over 4 096 bytes.

Parameters ​

ParameterType
optsMintOptions

Returns ​

Promise<string>

Talkline documentation