Skip to content

Youtube Music

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:

ytmusic.json
{
"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.

Session Options

For File and AIO config, innerTubeOptions is an optional property you can use to tailor SessionOptions from ytjs.dev, for YTM.

innerTubeOptions shown in the schema explorer documents some of the properties that may be relevant to your multi-scrobbler experience but you can pass any of the properties found in SessionOptions to innerTubeOptions.

Configuration Type

This is configuration for the ENV Config Type.

Environmental Variable Type Default Description
YTM_ID string A globally unique ID EX myComponentId
YTM_NAME string Value of YTM_ID A vanity name EX My Cool Component
YTM_ENABLE boolean true Should this component be used?
YTM_REDIRECT_URI string Google Cloud Console project OAuth Client Authorized redirect URI
YTM_CLIENT_ID string Google Cloud Console project OAuth Client ID
YTM_CLIENT_SECRET string Google Cloud Console project OAuth Client Secret
YTM_COOKIE string The cookie retrieved from the Request Headers of music.youtube.com after logging in.

Bold/Italic = Required