Skip to content
Client
Server

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

Function: mintDeveloperToken() ​

ts
function mintDeveloperToken(options): Promise<string>;

Defined in: mint.ts:133

Signs a developer token: an ES256 JWT with iss, iat, exp, and optionally origin.

Parameters ​

options ​

tMintOptions

The key, whose it is, and what the token says about itself.

Returns ​

Promise<string>

The token in its compact form, as Apple takes it after Bearer.

Throws ​

TypeError if an option is not what it should be, or pem is not a PKCS8 P-256 private key. The function is async, so this is a rejection: nothing is thrown before the promise is made.

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