Closed deveshb-am closed 6 months ago
I am using Auth.authorize() function but it only gives me status instead of giving me the user token, is there a way to get the token?
Hi @deveshb-am, in order to use Apple MusicKit inside of your application, you have to enable MusicKit usage for your application in Apple Developer portal
Please refer to official docs: https://developer.apple.com/documentation/musickit/using-automatic-token-generation-for-apple-music-api
Auth.authorize() will return you only a status, not a token. After you enable usage of MusicKit for your app and successfully authorizes (it means that your user has an AppleMusic application and active subscription on his device), you will be able to use all capabilities of AppleMusic & play music directly in your application. If you have any questions, let me know.
I am using Auth.authorize() function but it only gives me status instead of giving me the user token, is there a way to get the token?
There is an alternative way to communicate with Apple Music services via bearer token, but it mostly used for web applications. In this case, you will have to create a special service key in Apple developer portal, and then convert it on your node.js server in a bearer token. After that, you can start use it with https://developer.apple.com/documentation/musickitjs/adding_musickit_features_using_html
I am using Auth.authorize() function but it only gives me status instead of giving me the user token, is there a way to get the token?