[READ-ONLY] Mirror of https://github.com/FoxxMD/multi-scrobbler. Scrobble plays from multiple sources to multiple clients docs.multi-scrobbler.app
deezer docker jellyfin koito lastfm listenbrainz maloja mopidy mpris music music-assistant plex scrobble self-hosted spotify subsonic tautulli youtube-music
0

Configure Feed

Select the types of activity you want to include in your feed.

docs: update Apple Music configuration guide

Reorganized the Apple Music documentation to prioritize the Browser Token (Free) authentication method and clarify requirements for the paid MusicKit Key approach.

Exerra (Jul 14, 2026, 9:27 PM +0300) 5d34ea68 4ae38867

+39 -29
+39 -29
docsite/docs/configuration/sources/applemusic.mdx
··· 29 29 30 30 #### 2. Authentication 31 31 32 - The Apple Music API requires a Developer Token (JWT). Multi-Scrobbler can either automatically **generate** this JWT for you using an Apple Music API key, or you can manually provide a **pre-generated token**. 32 + To authorize API access, Multi-Scrobbler requires an Authentication Token (JWT). Because the official Apple Music API is designed for developers, there are two ways to provide this token depending on your situation: 33 + 34 + * **Browser Token (Free & Most Common):** Best for 99% of users. You can easily extract a temporary token from the Apple Music web player without needing an Apple Developer account. 35 + * **MusicKit Key (Requires Paid Apple Developer Account):** If you happen to be enrolled in the paid Apple Developer Program ($99/year), you can provide a private key to automatically generate permanent tokens. 36 + 37 + Choose your preferred method below: 33 38 34 39 <Tabs groupId="appleMusicAuth" queryString> 35 - <TabItem value="key" label="MusicKit Key (Recommended)"> 40 + <TabItem value="token" label="Browser Token (Free)"> 41 + 42 + Since most users don't have a paid developer account, extracting the token from the web player is the standard approach. 43 + 44 + While browsing [music.apple.com](https://music.apple.com) with Developer Tools open, inspect the **Network** tab. Look at the request headers for any request made to `amp-api.music.apple.com`. Copy the `authorization` header value (use everything *after* the `Bearer ` prefix). 45 + 46 + ```json 47 + { 48 + "data": { 49 + "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJFUzI1NiIsIm...", 50 + "mediaUserToken": "your-media-user-token-here", 51 + "headers": { 52 + "Origin": "https://music.apple.com" 53 + } 54 + } 55 + } 56 + ``` 57 + 58 + :::info[Custom Header Required] 59 + When using a JWT extracted from the browser, Apple requires the request to match the domain it was issued to. You **must** include the `Origin` header in your config as shown above. 60 + ::: 61 + 62 + *Note: Browser-generated JWTs are valid for a maximum of 35 days and must be updated manually when they expire.* 63 + 64 + </TabItem> 65 + <TabItem value="key" label="MusicKit Key (Paid Account)"> 66 + 67 + :::warning[Apple Developer Account Required] 68 + To generate JWTs automatically, you must be enrolled in the paid [Apple Developer Program](https://developer.apple.com/programs/) ($99/year) and create a MusicKit key. If you don't have an account, use the **Browser Token (Free)** tab instead. 69 + ::: 36 70 37 71 To generate JWTs automatically and avoid manual token refreshes, you need an Apple Music API key: 38 72 ··· 60 94 ::: 61 95 62 96 </TabItem> 63 - <TabItem value="token" label="Pre-generated Token"> 64 - 65 - If you don't have an Apple Developer account, you can piggyback off the web app's token. 66 - 67 - While browsing [music.apple.com](https://music.apple.com) with Developer Tools open, inspect the **Network** tab. Look at the request headers for any request made to `amp-api.music.apple.com`. Copy the `authorization` header value (use everything *after* the `Bearer ` prefix). 68 - 69 - ```json 70 - { 71 - "data": { 72 - "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJFUzI1NiIsIm...", 73 - "mediaUserToken": "your-media-user-token-here", 74 - "headers": { 75 - "Origin": "https://music.apple.com" 76 - } 77 - } 78 - } 79 - ``` 80 - 81 - :::info[Custom Header Required] 82 - When using a JWT extracted from the browser, Apple requires the request to match the domain it was issued to. You **must** include the `Origin` header in your config as shown above. 83 - ::: 84 - 85 - *Note: Browser-generated JWTs are valid for a maximum of 35 days and must be updated manually when they expire.* 86 - 87 - </TabItem> 88 97 </Tabs> 89 98 90 99 --- ··· 92 101 #### How Multi-Scrobbler handles Apple Music quirks 93 102 94 103 **Timestamp Estimation** 104 + 95 105 The Apple Music API **does not provide timestamps** for when tracks were played. Multi-Scrobbler estimates play times by taking the current time and subtracting track durations backwards: 96 106 * The most recent track is assumed to have finished playing **now**. 97 107 * Each older track is estimated to have played `duration` seconds before the previous one. 98 108 99 - *For the most accurate scrobble timestamps, it is highly recommended to keep the polling `APPLEMUSIC_INTERVAL` low (the default is 60 seconds).* 109 + *For the most accurate scrobble timestamps, it is highly recommended to keep the polling interval (`APPLEMUSIC_INTERVAL`) low (the default is 60 seconds).* 100 110 101 111 102 112 ## Configuration Reference ··· 109 119 | `APPLEMUSIC_KEY_ID` | No | | Key ID from your MusicKit key. | 110 120 | `APPLEMUSIC_TEAM_ID` | No | | Team ID from your Apple Developer account. | 111 121 | `APPLEMUSIC_KEY_P8` | No | | The contents of your MusicKit `.p8` private key file.| 112 - | `APPLEMUSIC_TOKEN` | No | | A pre-generated JWT (alternative to key properties). | 122 + | `APPLEMUSIC_TOKEN` | No | | The authentication JWT extracted from the browser. | 113 123 | `APPLEMUSIC_INTERVAL` | No | `60` | Polling interval in seconds. | 114 124 | `APPLEMUSIC_NAME` | No | | A vanity name different than the ID. | 115 125 </Config>