Skip to content
Client
Server

Reference / @open-music-sdk/developer-token / tMinterOptions

Interface: tMinterOptions ​

Defined in: mint.ts:31

What developerTokenMinter takes: what a mint takes, and how far ahead the next one happens. Invalid values throw a TypeError.

Extends ​

Properties ​

keyId ​

ts
readonly keyId: string;

Defined in: mint.ts:19

The ID of the MusicKit key, the ten capital letters and digits in the file's name; becomes kid.

Inherited from ​

tMintOptions.keyId


origin? ​

ts
readonly optional origin?: readonly string[];

Defined in: mint.ts:27

Web origins the token is valid for, each exactly as a browser sends it: https://app.example, with no path and no trailing slash. An empty list is a TypeError; leave the option out for no restriction. Set it on any token a browser will see.

Inherited from ​

tMintOptions.origin


pem ​

ts
readonly pem: string;

Defined in: mint.ts:15

The contents of AuthKey_XXXXXXXXXX.p8: a PKCS8 PEM. Line breaks escaped as \n, as an environment variable usually holds them, are accepted, and so are Windows line endings, a byte order mark and whitespace around it.

Inherited from ​

tMintOptions.pem


refreshAheadSeconds? ​

ts
readonly optional refreshAheadSeconds?: number;

Defined in: mint.ts:33

Mint a replacement this long before exp. Default, and at most, half the lifetime.


teamId ​

ts
readonly teamId: string;

Defined in: mint.ts:17

Your Apple Developer Team ID, ten capital letters and digits as Apple issues it; becomes iss.

Inherited from ​

tMintOptions.teamId


ttlSeconds? ​

ts
readonly optional ttlSeconds?: number;

Defined in: mint.ts:21

Lifetime in whole seconds, from 60 to 15 777 000 (Apple's six months). Default one hour.

Inherited from ​

tMintOptions.ttlSeconds

MIT licensed. Not affiliated with, endorsed by, or sponsored by Apple Inc. Apple Music and MusicKit are trademarks of Apple Inc.