Skip to content

YoshKoz/Reurlify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Reurlify

Intercepts open.spotify.com links on Windows and opens them directly in the Spotify desktop app — no browser, no redirect flash.

Works from any app (Telegram, Discord, etc). Plays the track/album immediately, navigates Spotify to the correct page, and falls back gracefully to your existing browser for all other links.

Requirements

  • Windows 10/11 x64
  • .NET 8 Desktop Runtime
  • Spotify desktop app (user install or Microsoft Store)
  • A free Spotify developer app — see step 1

Setup

1. Create a Spotify app

  1. Go to Spotify Developer Dashboard
  2. Click Create app
  3. Set redirect URI to: http://127.0.0.1:9876/callback
  4. Enable Web API
  5. Copy your Client ID and Client Secret

2. Add your credentials

Edit src/Reurlify.cs and replace:

const string ClientId     = "YOUR_CLIENT_ID";
const string ClientSecret = "YOUR_CLIENT_SECRET";

3. Build

dotnet publish src/Reurlify.csproj -c Release -r win-x64 --self-contained false -o out

4. Register as default browser

Run this in PowerShell from the repo root:

$exePath = "$PWD\out\Reurlify.exe"
$progId  = "ReurlifyHTML"

New-Item -Path "HKCU:\Software\Classes\$progId" -Force | Out-Null
Set-ItemProperty -Path "HKCU:\Software\Classes\$progId" -Name "(Default)" -Value "Reurlify URL Handler"
New-Item -Path "HKCU:\Software\Classes\$progId\Application" -Force | Out-Null
Set-ItemProperty -Path "HKCU:\Software\Classes\$progId\Application" -Name "ApplicationName" -Value "Reurlify"
New-Item -Path "HKCU:\Software\Classes\$progId\DefaultIcon" -Force | Out-Null
Set-ItemProperty -Path "HKCU:\Software\Classes\$progId\DefaultIcon" -Name "(Default)" -Value "$exePath,0"
New-Item -Path "HKCU:\Software\Classes\$progId\shell\open\command" -Force | Out-Null
Set-ItemProperty -Path "HKCU:\Software\Classes\$progId\shell\open\command" -Name "(Default)" -Value "`"$exePath`" `"%1`""

$cap = "HKCU:\Software\Clients\StartMenuInternet\Reurlify\Capabilities"
New-Item -Path $cap -Force | Out-Null
Set-ItemProperty -Path (Split-Path $cap) -Name "(Default)" -Value "Reurlify"
Set-ItemProperty -Path $cap -Name "ApplicationName" -Value "Reurlify"
Set-ItemProperty -Path $cap -Name "ApplicationDescription" -Value "Routes Spotify links to the Spotify desktop app"
New-Item -Path "$cap\URLAssociations" -Force | Out-Null
Set-ItemProperty -Path "$cap\URLAssociations" -Name "http"  -Value $progId
Set-ItemProperty -Path "$cap\URLAssociations" -Name "https" -Value $progId
New-Item -Path "HKCU:\Software\Clients\StartMenuInternet\Reurlify\shell\open\command" -Force | Out-Null
Set-ItemProperty -Path "HKCU:\Software\Clients\StartMenuInternet\Reurlify\shell\open\command" -Name "(Default)" -Value "`"$exePath`" `"%1`""
Set-ItemProperty -Path "HKCU:\Software\RegisteredApplications" -Name "Reurlify" -Value "Software\Clients\StartMenuInternet\Reurlify\Capabilities"

Write-Host "Done. Go to Settings > Apps > Default Apps, search for Reurlify, and set it as default for HTTP and HTTPS."

Then open Settings → Apps → Default Apps, search for Reurlify, and set it as default for HTTP and HTTPS.

5. Authorize

Click any Spotify link. A browser tab opens for Spotify OAuth — log in and approve. Done. Token is saved locally and auto-refreshes forever.

How it works

  • Registered as default browser — intercepts all link clicks before the browser opens
  • open.spotify.com URLs → converted to spotify: URIs → Spotify Web API triggers immediate playback in album context
  • All other URLs → passed to your existing default browser (auto-detected from registry)
  • Spotify install location auto-detected (supports both user install and Microsoft Store)

License

MIT

About

Intercepts open.spotify.com links on Windows and opens them directly in the Spotify desktop app — no browser redirect.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages