MusivaDocs
Internal Services

Deezer ARL Token Manager

Centralized authentication lifecycle, token rotation, and stream decryption service for high-bitrate Deezer audio.

Official Service: https://deezer.musiva.app/
Rotation Endpoint: https://deezer-arl.musiva.app/api/arl/raw?rotate=true

The Deezer ARL Service automates the retrieval, validation, rotation, and distribution of Deezer Application Request Log (ARL) session cookies. ARL tokens allow Musiva to stream audio directly from Deezer's content delivery network at lossless FLAC and 320kbps MP3 quality, significantly outperforming standard YouTube audio streams.


Capabilities & Lifecycle Management

  • Automated Login & Retrieval: Regularly refreshes user session cookies using dedicated credential pools.
  • Token Validation: Performs automated health checks against Deezer's internal API to detect revoked sessions before playback requests fail.
  • Dynamic Rotation: The rotate=true query parameter enables round-robin selection among multiple healthy ARL tokens to prevent per-account rate limits.
  • Centralized Storage: Eliminates hardcoded tokens in backend repositories, reducing maintenance overhead.

Integration Points

1. Web Activities (Discord DM & Group DM)

Musiva's Discord Embedded Web Activities utilize the Deezer ARL service to stream audio directly into private calls and group chats without routing raw voice packets through a traditional Discord bot user.

Lavalink uses the ARL token within its lavasrc plugin configuration to authenticate search requests and fetch audio decryption keys:

application.yml
plugins:
  lavasrc:
    deezer:
      # Obtain a healthy ARL token from https://deezer.musiva.app/
      arl: "YOUR_DEEZER_ARL_TOKEN"
      formats:
        - FLAC
        - MP3_320
        - MP3_256
        - MP3_128
        - MP3_64
        - AAC_64
      masterDecryptionKey: "g4el58wc0zvf9na1"

Token Renewal & Troubleshooting

When Does the ARL Need to Be Replaced?

Deezer ARL tokens have a variable lifespan and often remain valid for several months. Tokens do not need to be replaced on a fixed schedule.

The primary indicator that an ARL token has expired is when users encounter playback failures and the Lavalink terminal logs repeated HTTP 403 Forbidden errors during Deezer track resolution:

c.g.t.l.p.d.DeezerAudioSourceManager : Failed to load track: HTTP 403 Forbidden

Renewal Procedure:

  1. Open the Deezer ARL Dashboard.
  2. Copy the latest active ARL token from the pool.
  3. Open your Lavalink server's application.yml configuration.
  4. Update the plugins.lavasrc.deezer.arl field.
  5. Restart the Lavalink server.