Skip to main content

Youtube Music

warning

Communication with YT Music is unofficial and not supported or endorsed by Google. This means that this integration may stop working at any time if Google decides to change how YT Music works in the browser.

Scrobble Troubleshooting

Due to monitoring being unofficial, listening history from YTM can be inconsistent and can cause missed scrobbles.

See the FAQ for a detailed explanation, how to see more details about MS's detection of tracks, and how to properly report an issue.

Authentication

Only one of these methods needs to be used.

Use instructions from

to get the Cookie value from a browser.

It is highly recommended to get the cookie from an Incognito/Private Session to limit the chance the session is invalidated from normal browsing.

Add the cookie to your ytmusic.json config in data or as an ENV:

    {
"type": "ytmusic",
"enable": true,
"name": "MyYTM",
"data": {
"cookie": "__Secure-1PSIDTS=sidts-CjEB3EgAEvCd-......"
},
"options": {
"logAuthUpdateChanges": true,
"logDiff": true
}
}

If MS gives you authentication errors (session invalidated) at some point in the future follow the same instructions to get new cookies.

Configuration

ENV Config Type

Environmental VariableRequired?DefaultDescription
YTM_COOKIENoValue for Cookie Authentication
YTM_CLIENT_IDNoClient ID for OAuth Athentication
YTM_CLIENT_SECRETNoClient Secret for OAuth Athentication
YTM_REDIRECT_URINoA custom redirect URI for OAuth Athentication
YTM_LOG_DIFFNofalseLog YTM history changes