Discord-Spotify Integration Guide

Feb 2026

Requirements:

- A Spotify account, with Premium active

This is due to a recent Spotify developer change, requiring a Premium account to create "apps"

- The program from GitHub

Either DSI + SHA or just DSI standalone

- A Windows PC

At least for now, the directory system is only configured for Windows

- About 15 minutes

Note:

This program does *not* process any non-live Spotify information as a standalone

This means the total number of track plays, track playtime, total hours, etc

To access more information, you'll need either the DSI+SHA release or the standalone of each

You can find both the program and its guide on my GitHub, or by clicking on: Spotify Analyser

Got it all? Good - let's go

-

Part 1 - Discord Application:

1. Go to the Discord Developers page and create a new application

2. The name of your application will be the text following "Listening to"

I'd recommend something along the lines of "Spotify" or "music"

Grab your "Application ID" while you're here

3. In the "OAuth2" section, add "https://127.0.0.1/callback" under "Redirects"

This is required later, when Discord wants to link your account

4. In the "Art Assets" under "Rich Presence", you can add pictures to use for your activity visuals

This works, but Discord's image caching is not very good. I'd recommend you use an image hosting website and add links in the included picture text file later

5. Fill out and submit the form under "Getting Started"

Details don't matter here

-

Part 2 - Spotify API:

1. Go to the Spotify Developer page and create a new app

The basic information does not matter, name it whatever you'd like

2. Set a redirectURI

I'd recommend "http://127.0.0.1:", followed by a 4-digit port of your choosing

Ex. "http://127.0.0.1:6969"

This opens a browser window at that address when you first connect

Save the URI, "ClientID" and "Client Secret" (click "View Client Secret")

-

Part 3 - The Program:

1. If you haven't already - download a Release from the GitHub

1. Unzip the program into a folder of your choosing

NOTE: If using with Spotify Analyser, this program must be unzipped inside the "DSI" folder inside Spotify Analyser's main folder

2. Open the "config.ini" file and enter your values in the [Required] section

If these are not set, the program will not be able to receive/send information

Any information is never passed to me or anyone else, only between you and Spotify/Discord

You can configure any other aspects here, too, like the pictures, how the activity fields look, what format you want your data in, etc

3. Once ready, run the program

You likely will get a warning about "unsafe program" - don't worry, this isn't a virus

In case you don't know, Microsoft uses something called "signing" to authenticate the programs are "somewhat legit"

All that means is "pay us and we'll make your app not have a warning" (it also requires some "trust factor", which just means enough downloads)

I just don't have the desire to spend hundreds to stop a popup, sorry...

NOTE: To access the additional information, you will need to have run Spotify Analyser fully at least once

DSI needs both the "dsi.csv" and "hours.txt" files that Spotify Analyser creates to display accurate playcount/time data

4. The program should open tabs asking to authenticate - do so

One for Spotify, one for Discord, though Discord may open a prompt in the client instead

5. Hooray!

Your activity should now list the song you're listening to on Spotify!

You've reached the end. Thank you for installing my program and have fun playing with numbers :)

-

Optional - URI Mapping:

Only affects data from Spotify History Analyser

The way this program checks not only the currently playing track, but also the data from the CSV is via "URI"s

URI, or "Uniform Resource Identifier" is what Spotify uses to internally identify tracks, and they look like: "spotify:track:4PTG3Z6ehGkBFwjybzWkR8"

The problem is, sometimes, due to licensing in different regions, there'll often be multiple URIs for one track

To fix this, DSI by default saves every song's URI as you listen, which you can then turn into "maps" (this is a config setting and can be disabled)

URImap.exe takes the list of saved URIs and asks Spotify "what is the URI for this song that I should use"

This response from Spotify is saved in a "map" of URIs, where the original URI is tied to the "alternative" URI (URI:AltURI)

The next time DSI sees a track where the URI doesn't match anything in the CSV, it'll check the alternative URI and most of the time finds a match

Like the title suggests, this is fully optional, and DSI already has a "fallback" that gets different data if it can't find the current track in the CSV

If you listen to a lot of music released outside your "market area", this may impact you more - if you listen to a lot of local music, you may never even notice

-

Performance

Saving URIs is the most resource-intensive part of the program, and if you feel it's affecting your computer, set "enable_URI_Mapping" to False in the config

This only happens the first time the song is played, so after a while, you shouldn't even notice it

Any issues? Ideas? Stupid block of code I probably should've fixed?

Make a bug report on GitHub or shoot me a message on Discord: LilPiffer :)