Skip to main content

Apple Music

MusicAPI holds the Apple Music credentials used to authenticate your listeners. They are used solely to facilitate music transfers a listener has authorised, the same way FreeYourMusic works. You do not need a Apple Music developer account, and you never store Apple Music tokens.

Enable Apple Music

  1. Open the MusicAPI Developer Dashboard and go to Integrations.
  2. Mark Apple Music as Enabled so listeners see it as an option.
  3. Use the Test Apple Music button to run the login flow once with your own account.

Listeners see your business name and logo on the authorisation screen. Set both under Account in the dashboard.

Redirect listeners to Apple Music

To open the Apple Music authorisation flow directly:

Or let listeners pick from every service you enabled:

After authorisation the listener returns to your returnUrl. See Authentication Callback for the payload.

Apple Music specifics

  • Apple Music uses Sign in with Apple plus a MusicKit user token. MusicAPI handles the developer token, storefront selection and library-versus-catalogue ID mapping for you.
  • The Apple Music API does not let third parties rename or re-describe an existing playlist. Creating playlists and adding tracks works.

Known problems

If you use your own Apple developer key and see:

    { "message": "Invalid token specified" }

make sure the key has both Media Services and Sign in with Apple enabled:

Example Apple Music Key

Advanced: use your own Apple Music developer app

You do not need this for a standard integration. Use it only when you already run a Apple Music developer app and want listeners to authorise that app instead of the MusicAPI one.

Steps for your own Apple Music app

You need a paid Apple Developer Program membership.

  1. Find your Team ID at developer.apple.com/account.

    Example Apple Team ID

  2. Generate a Key ID and Private Key in the Apple Certificates Portal: Create a Media Identifier and Private Key.

  3. Register a Services ID to get the Client ID: Register a Services ID.

    Example Apple Client ID

  4. When configuring Sign in with Apple on the Services ID, make sure that:

    • Domains & Subdomains lists both api.musicapi.com and app.musicapi.com
    • Return URL is https://api.musicapi.com/callback/apple_sign_in

Then, in the MusicAPI Developer Dashboard, open Integrations, paste the credentials into the Apple Music integration and save.