I'm trying to access my personal Apple Music library. When I followed the Apple Docs they said we need to generate Music User Token and pass the music user token in the header. How can I do that in the react-native. Not sure where to start.
Asked
Active
Viewed 510 times
1 Answers
1
The Apple Music API doesn't let you manually ask for a user token (as far as I know). You have to use their proprietary frameworks to do that.
In iOS, it's as simple as calling a framework function.
In Android, the SDK has to be downloaded and added to the project (and then a function call to get the user token once you have it)
For JS, refer to this documentation.
It tells you to embed MusicKit JS into your webpage/JS program and other things like wrapping its authorize
method.
The UI flow is handled for you. A pop-up for the user's AppleID and password will be presented for the user to fill in.

Xavier L.
- 709
- 5
- 21