Skip to content

Authentication

Salehin Ashfi edited this page Jun 2, 2026 · 1 revision

Authentication

To download content at Premium quality (AAC 256kbps, FLAC, 24-bit FLAC), Dotify needs two things:

  1. Spotify session cookies — proves you're logged in to a Premium account
  2. Widevine Device key (.wvd) — used to decrypt DRM-protected audio streams

Without these, Dotify falls back to the highest available free quality (128kbps AAC).


Step 1 — Get Your Spotify Cookies

Install a Cookie Export Extension

Browser Extension
Chrome / Edge "Get cookies.txt LOCALLY"
Firefox "Export Cookies" add-on

Export the Cookies

  1. Open open.spotify.com in your browser.
  2. Log in with your Premium account.
  3. Click the extension icon and export cookies as cookies.txt.
  4. Save the file to ~/.dotify/cookies.txt.

Tell Dotify Where the Cookies Are

Option A — Command-line flag:

dotify --cookies-path ~/.dotify/cookies.txt "spotify:track:..."

Option B — Set it once in config.json (recommended):

{
  "cookies_path": "~/.dotify/cookies.txt"
}

Tip: If cookies expire, you'll get a 403 Forbidden error. Re-export fresh cookies from an incognito window and replace the file.


Step 2 — Get Your Widevine Key (.wvd)

Spotify uses Widevine DRM to protect its audio streams. To decrypt them, Dotify needs a Widevine Device file (.wvd) extracted from a real Android device.

Using KeyDive

KeyDive is the recommended tool for extracting a .wvd from an Android device (physical or emulated).

  1. Follow the KeyDive setup instructions.
  2. Run KeyDive on your Android device to extract the Widevine keys.
  3. This produces a device.wvd file.
  4. Place it at ~/.dotify/keys/device.wvd.

Tell Dotify Where the Key Is

Option A — Command-line flag:

dotify --wvd-path ~/.dotify/keys/device.wvd "spotify:track:..."

Option B — Set it once in config.json (recommended):

{
  "wvd_path": "~/.dotify/keys/device.wvd"
}

Verify Authentication

Run the environment doctor after placing both files:

dotify env doctor

It will confirm that both cookies.txt and device.wvd are correctly detected.


Free Account Usage

Dotify works without any credentials — it will just download at the highest available free quality (128kbps AAC). You only need cookies and a .wvd if you want Premium-tier audio.

# Authentication

To download content at Premium quality (AAC 256kbps, FLAC, 24-bit FLAC), Dotify needs two things:

  1. Spotify session cookies — proves you're logged in to a Premium account
  2. Widevine Device key (.wvd) — used to decrypt DRM-protected audio streams

Without these, Dotify falls back to the highest available free quality (128kbps AAC).


Step 1 — Get Your Spotify Cookies

Install a Cookie Export Extension

Browser Extension
Chrome / Edge "Get cookies.txt LOCALLY"
Firefox "Export Cookies" add-on

Export the Cookies

  1. Open [open.spotify.com](https://open.spotify.com) in your browser.
  2. Log in with your Premium account.
  3. Click the extension icon and export cookies as cookies.txt.
  4. Save the file to ~/.dotify/cookies.txt.

Tell Dotify Where the Cookies Are

Option A — Command-line flag:

dotify --cookies-path ~/.dotify/cookies.txt "spotify:track:..."

Option B — Set it once in config.json (recommended):

{
  "cookies_path": "~/.dotify/cookies.txt"
}

Tip: If cookies expire, you'll get a 403 Forbidden error. Re-export fresh cookies from an incognito window and replace the file.


Step 2 — Get Your Widevine Key (.wvd)

Spotify uses Widevine DRM to protect its audio streams. To decrypt them, Dotify needs a Widevine Device file (.wvd) extracted from a real Android device.

Using KeyDive

KeyDive is the recommended tool for extracting a .wvd from an Android device (physical or emulated).

  1. Follow the [KeyDive setup instructions](https://github.com/hyugogirubato/KeyDive).
  2. Run KeyDive on your Android device to extract the Widevine keys.
  3. This produces a device.wvd file.
  4. Place it at ~/.dotify/keys/device.wvd.

Tell Dotify Where the Key Is

Option A — Command-line flag:

dotify --wvd-path ~/.dotify/keys/device.wvd "spotify:track:..."

Option B — Set it once in config.json (recommended):

{
  "wvd_path": "~/.dotify/keys/device.wvd"
}

Verify Authentication

Run the environment doctor after placing both files:

dotify env doctor

It will confirm that both cookies.txt and device.wvd are correctly detected.


Free Account Usage

Dotify works without any credentials — it will just download at the highest available free quality (128kbps AAC). You only need cookies and a .wvd if you want Premium-tier audio.

Clone this wiki locally