This is a simple script to sign and encode the JWT developer token used by MusicKit.
Before you can use the token encoder, you need to install the JWT gem:
sudo gem install jwt
Simply execute the music-token-encoder
command along with the following parameters:
- Private Key (.p8)
- Key ID
- Team ID
- Token expiration in days (currently: must not be greater than 180)
./musickit-token-encoder <KEY>.p8 <KEYID> <TEAMID> 180