Skip to content

Instantly share code, notes, and snippets.

@vitiko98
Last active February 11, 2026 14:48
Show Gist options
  • Select an option

  • Save vitiko98/bb89fd203d08e285d06abf40d96db592 to your computer and use it in GitHub Desktop.

Select an option

Save vitiko98/bb89fd203d08e285d06abf40d96db592 to your computer and use it in GitHub Desktop.
Get Qobuz App ID and Secrets
  • Install qobuz-dl with pip install qobuz-dl.
  • Run the script with python3 get_keys.py.

The output will look like this:

victor@void $ python3 get_keys.py
App ID: xxxxxxxxx
####################
Secrets (the first usually works):
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
from qobuz_dl.bundle import Bundle
bundle = Bundle()
app_id = bundle.get_app_id()
secrets = "\n".join(bundle.get_secrets().values())
print(f"App ID: {app_id}")
print("#" * 20)
print(f"Secrets (the first usually works):{secrets}")
@38github
Copy link

I had problems finding the secrets value in Firefox so I had to open my qobuz-dl config file under ~/.config/qobuz-dl/config.ini and there was a line with two secrets seperated by a comma. The first one did not work but the second one did.

@GONNAGITU72
Copy link

victor@void $ python3 get_keys.py
App ID: xxxxxxxxx
####################
Secrets (the first usually works):
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

@GONNAGITU72
Copy link

from qobuz_dl.bundle import Bundle

bundle = Bundle()
app_id = bundle.get_app_id()
secrets = "\n".join(bundle.get_secrets().values())

print(f"App ID: {app_id}")

print("#" * 20)

print(f"Secrets (the first usually works):{secrets}")

@Blessuremortelle
Copy link

Hi, I have the codes, but how do I use them?

@danir-de
Copy link

danir-de commented Jan 4, 2025

@Blessuremortelle For example with KDE Strawberry.

@piperswe
Copy link

a script you can just chmod +x and run as long as you have uv installed:

#!/usr/bin/env -S uv run --script
# /// script
# dependencies = [
#     "qobuz-dl"
# ]
# ///

from qobuz_dl.bundle import Bundle

bundle = Bundle()
app_id = bundle.get_app_id()
secrets = "\n".join(bundle.get_secrets().values())

print(f"App ID: {app_id}")

print("#" * 20)

print(f"Secrets (the first usually works):{secrets}")

@flaun
Copy link

flaun commented Nov 20, 2025

Hello,
I was able get the keys inside a virtual evironment: qobuz-dl-env
Unfortunately the App-ID and Secret I copied into Strawberry did not work. It is possible to search for different songs, but playing a song with strawberry leads to an error: Invalid Request Signature parameter (request_sig) (Root=1-691eee45-13d565535fe09d141f8693f7) (400)

Any ideas? Help would be great:)

@peterscottsa
Copy link

@flaun I had the same error but for me the third secret worked. Not sure if you have tried all three?

@flaun
Copy link

flaun commented Dec 7, 2025

@flaun I had the same error but for me the third secret worked. Not sure if you have tried all three?

It indeed worked now with the third one. Even if I'm sure I tried all the keys 2 weeks ago. Anyway, thanks fir your answer:)

@ElektroStudios
Copy link

ElektroStudios commented Feb 11, 2026

Script automated to install required qobuz_dl module if not found, and to pause the script execution after the Qobuz values are displayed. Text formatting a little bit improved. In Windows, just double click the script file. Not tested in Unix/Linux.

WinSnap 01

Qobuz_Keys.py

# -*- coding: utf-8 -*-
import os, sys, subprocess

# Get Qobuz App ID and Secrets — Gist
# https://gist.github.com/vitiko98/bb89fd203d08e285d06abf40d96db592
title = "Qobuz App ID and Secrets"

# Try to import qobuz_dl, install if not found.
try:
    from qobuz_dl.bundle import Bundle
except ModuleNotFoundError:
    print("qobuz_dl not found, installing...")
    subprocess.check_call([sys.executable, "-m", "pip", "install", "qobuz_dl"])
    # Clear the console after installation.
    os.system('cls' if os.name == 'nt' else 'clear')
    # Try importing again after installation.
    from qobuz_dl.bundle import Bundle

bundle = Bundle()
appId = bundle.get_app_id()
entryPrefix = f"\n{' ' * 2}\u2014 "
secrets = entryPrefix + (entryPrefix.join(bundle.get_secrets().values()))

print(
    f"{chr(0x002A) * 5} {title} {chr(0x002A) * 5}\n\n"
    f"{(appIdLine := f'App ID: {appId}')}\n"
    f"{chr(0x203E) * len(appIdLine)}\n"
    f"App Secrets (the first usually works):{secrets}\n"
)

if os.name == 'nt':
    os.system(f'title {title}& pause')
else:
    os.system(f'printf "\33]0;{title}\a"; read -n1 -s -p "Press any key to exit..."')

sys.exit(0)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment