Can someone please explain developer and user tokens?

I have been looking all over the internet, and nowhere is there an explanation of why I need these tokens, and more importantly what to do with them when I get them. I was able to get my developer token by doing a bunch of weird terminal and github stuff, but I dont know how to request user token. Also what do I do with my developer token? Is there some special variable I need to make it, do I need to pass it into some function? Can someone please explain what these tokens are and how I can use them to access a users local apple music media library (preferably with code)?

A developer token is similar to an API Key that other API's would use, this allows access to api endpoints and also identifies who is sending these requests(to keep track of rate limits and such), they are using a JWT(jsonwebtoken) for this because it is a way to safely encode your kid and transport it via HTTP requests.


A usertoken is a way to track what user is using your service, this is requested for user specific requests like GetUserLibrary. To get this you need to send the user to a login page to allow the user to authorize your app, upon allowing or declining access it will redirect back to your app or website with either the token or denied access error. They do not have any documentation on requesting this manually through http calls but they do have frameworks for almost any language you might be using, visit here: https://developer.apple.com/musickit/


It offers how to incorporate musickit with iOS, Android, and web via JS.


Hope this helps!


-Austin

Can someone please explain developer and user tokens?
 
 
Q