Search code examples
iosstorekitapple-musicapple-musickit

StoreKit - format of clientToken for requestPersonalizationToken?


In the sparse Apple StoreKit Docs it mentions using a clientToken to request a personalizationToken from a device via requestPersonalizationToken.

There is no accompanying documentation to describe what this token should be. I had assumed that it should take the form of a developer JWT token but that does not appear to work, giving the error SKErrorDomain code 8 with a nil token response.

I know that the token works for a regular call to the Music API and so assume it is of the correct format for a developerToken.

I am aware that Apple are not giving out tokens via requestUserTokenForDeveloperToken until later in the year but assumed that requestPersonalizationToken was the current (although already deprecated) method until iOS 11 is released.


Solution

  • For any others that hit this thread.

    Yes, the token is the same format. Apple have recently pushed an update out that resolves the issues that I was encountering. The exact same code now successfully retrieves a UserToken.