(method) MusicKit.MusicKitInstance.authorize(): Promise<string>
Returns a promise containing a music user token when a user has authenticated and authorized the app.
function authenticateAppleMusic() {
musicKit.authorize().then((userToken: string) => {
console.log(userToken)
});
}