Skip to content

billyham/Kitsch_Player_Token_Server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A server for generating developer tokens for Apple's MusicKit service

For information about MusicKit tokens, visit the Apple documentation

On the server you will need two environment variables with the following names:

  • MUSIC_KIT_KEY_ID
  • APPLE_TEAM_ID

And a private key file at the root named:

  • AuthKey.p8

See instructions from Apple documentation about generating the private key and MusicKit Key ID.

Generated tokens have a six month duration before expiring.

Starting the server

npm run dev
The server will be a port 4000 unless otherwise specified with PORT env

TODO:

  • An application key to authorize requests
  • Unit tests

NOTE: The private key is pulled in as an environment variable, which works while it runs on Heroku, but it doesn't work locally. Switch to loading the key by file reading to run locally.

About

NodeJS server for generating developer tokens for Kitsch Player to access Apple's MusicKit service

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published