Music User Token into Python via MusicKit JS or API?

Hi! I've been working on a project in python that pulls in a bunch of my personal apple music playback history and library, etc.

I can't find a single good/functional example on how to pull the Music User Token via the android method or MusicKit JS (web) - I've spent a lot of hours on this today, and no permutation of existing examples/documentation has worked.

Any guidance would be much appreciated!! If you have a web app that pulls the music user token, I just need help understanding how to get to the token itself.

Thank you!

(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)
			});
		}

Hi! I'm working on a very similar personal project in python and I ran into the same problem. Did you find a solution yet?

Music User Token into Python via MusicKit JS or API?
 
 
Q