3

how to create music user token for Apple musikkit API's. Each time execute

SKCloudServiceController().requestPersonalizationToken(forClientToken: developerTokenString) { (userToken, error) in
if let token = userToken {
       //
   } else {
       debugPrint("user token error \(error!.localizedDescription)")
   }
}

with developer token getting error

"The operation couldn’t be completed. (SKErrorDomain error 7.)"

Is there any way to check that my developer token is valid or not.

Anandhu Nadesh
  • 672
  • 2
  • 11
  • 20

1 Answers1

1

According to Apple documentation you can use the following command to test your token in terminal:

curl -v -H 'Authorization: Bearer [developer token]' "https://api.music.apple.com/v1/catalog/us/songs/203709340"
Berat Cevik
  • 1,818
  • 3
  • 22
  • 28