Skip to content

Setting up your Spotify developer app

Each ghostlistener install uses its owner’s own Spotify developer app. You need two things from Spotify for Developers:

Both need a Spotify Premium account. Sign in to the dashboard with the account ghostlistener will play on.

Create the app

  1. Open the dashboard and click Create app.

  2. Fill in the form:

    Field What to enter
    App name Anything, such as ghostlistener. Spotify shows it on the sign-in screen.
    App description Anything, such as Keeps my Spotify playing while I'm away.
    Website Leave it empty, or link your fork.
    Redirect URIs http://127.0.0.1:4467/callback, then click Add. See the redirect URI.
    APIs used Tick Web API.
  3. Accept the Developer Terms of Service and click Save.

  4. On the app’s page, open Settings and copy the Client ID into SPOTIFY_CLIENT_ID. ghostlistener signs in with PKCE, so it doesn’t use the client secret.

The redirect URI

Spotify sends you back to this address after you sign in, and it refuses any address that isn’t listed in the app exactly as ghostlistener sends it. The startup log prints the one ghostlistener uses (redirect_uri=...).

How you reach the dashboard Redirect URI to add
On the server itself, or through an SSH tunnel http://127.0.0.1:4467/callback
With GHOST_PORT set to another port http://127.0.0.1:<that port>/callback
Through a domain, with GHOST_BASE_URL set <GHOST_BASE_URL>/callback, such as https://ghost.example.com/callback

Spotify’s rules for redirect URIs:

Create the Soloist API key

  1. Open Spotify Soloist API Key in the same dashboard.
  2. Accept Spotify’s terms if it asks.
  3. Generate a key and copy it into SOLOIST_API_KEY on the soloist service.

The key belongs to the account that made it. Don’t share it, and treat files and screenshots that contain it as private.

Find your username

GHOST_ALLOWED_USERS takes your Spotify user ID, which Spotify calls Username. You’ll find it on your account page. It is usually a mix of letters and numbers, not your display name.

Playing on a different account

A new app runs in Development mode, where only the account that created it can sign in. If ghostlistener should play on another account, open the app’s User Management page and add that account’s name and email address.

ghostlistener plays for one account. The first account in GHOST_ALLOWED_USERS to sign in becomes the linked one, and after that no other account can sign in. Someone else who wants ghostlistener needs their own install and their own app.

If something goes wrong

What you see What to check
Spotify says INVALID_CLIENT: Invalid redirect URI The redirect URI in the app doesn’t match the one in ghostlistener’s startup log. Copy it from the log.
Spotify says INVALID_CLIENT: Invalid client SPOTIFY_CLIENT_ID has a typo, or the app was deleted.
ghostlistener refuses your account after sign-in Your username isn’t in GHOST_ALLOWED_USERS, or another account already signed in first. The error page says which.
The soloist container stops right after starting SOLOIST_API_KEY is missing or still the example value. docker compose logs soloist says which.