Returns a user token that you use to access personalized Apple Music content.
SDKs
- iOS 11.0+
- Mac Catalyst 13.0+
- tvOS 11.0+
Framework
- Store
Kit
Declaration
Parameters
developerToken
A signed and encrypted JWT token used to authenticate the developer in Apple Music API requests.
completionHandler
A completion block that includes the following parameters:
- userToken
A token that identifies the user.
- error
The error that occurred, if any.
Discussion
Use this method with your developer token to get a token that authenticates the user in personalized Apple Music API requests. Note that personalized requests return user-specific data. Errors 401 and 403 only occur when requesting a music user token. They do not occur for any of the other Apple Music API requests.