JSPM

apple-music-jwt

0.2.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 24
  • Score
    100M100P100Q57726F
  • License MIT

A library for creating JWTs for accessing the Apple Music API.

Package Exports

  • apple-music-jwt

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (apple-music-jwt) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

apple-music-jwt

A µ-library and command line tool for generating Apple Music API developer tokens.

version status coverage dependencies devDependencies

Installation

npm install apple-music-jwt

Usage

Library

var jwt = require('apple-music-jwt');

var keyID = '<music-key-id>';
var teamID = '<dev_team_id>';
var secret = '<base64_encoded_secret>'; // can also be a `Buffer` loaded from a file

var token = jwt.generate(keyID, teamID, secret);

CLI

Your key ID, team ID, and secret can be provided via CLI arguments. Any missing information will be prompted for. Your private key can be provided either by a path to a file (-f or --file) or by base 64 encoded string (-s or --secret).

apple-music-jwt -k '<key-id>' -t '<team-id>' -f '<path-to-private-key>'

Tests

npm test

License

MIT