Skip to content
Client
Server

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

Interface: tMintOptions ​

Defined in: mint.ts:10

Where the key and its two IDs are kept, and how they are loaded, is the caller's business: nothing here reads an environment or a file. Invalid values throw a TypeError. No error quotes a value.

Extended by ​

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.


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.


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.


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.


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.

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