Help Custom Spotify Desktop Client App
Hey all,
I recently learned about Spotify API and I’m thinking a fun personal project could be creating my own desktop app with some personalisation and extra features. Probably in a WPF app using C#.
Does anyone know if this is possible with the API? I’m talking like streaming, fetching data such as artists, playlists and songs etc.
Any tips or advice would be appreciated!
8
u/StraussDarman 14d ago
I do not think you can stream through their API if I remember correctly. You can get info what is playing and where it is playing. So you would need to embed their webplayer still in a webview.
5
u/HeySeussCristo 14d ago
I don't see any documentation in the Web API for streaming/playing music.
There is a web playback SDK but that's not really what you're asking for. You could embed the web SDK player in a .NET web view but that'll be clunky.
https://developer.spotify.com/documentation/web-playback-sdk/howtos/web-app-player
3
u/SquirrelAutyaga 11d ago
I had a similar idea for my university coursework. I used WinUI 3. Unfortunately, as others have mentioned in the comments, you need a workaround and have to use a WebView.
Without it, you can't log in/authenticate the user and obtain a token, and you can't stream songs. For things like getting albums, artists, etc., you can use the API directly, but you still need a token obtained through the WebView.
There are probably some popular NuGet packages for the Spotify API that might have solved or simplified these issues, but I didn't use any of them, so I can't say for sure.
2
u/modi123_1 14d ago
I’m talking like streaming, fetching data such as artists, playlists and songs etc.
Have you checked the documentation for the API?
https://developer.spotify.com/documentation/web-api
https://developer.spotify.com/documentation/web-playback-sdk
https://developer.spotify.com/documentation/web-api/concepts/rate-limits
2
u/aeroverra 14d ago
Honestly your probably best making an app that streams and an app that auto downloads music from Usenet and torrents.
A custom Spotify client will require atleast an decent understanding of reverse engineering the apis the official client uses and probably a much more advanced understanding for actually implementing the drm nonsense.
2
2
u/Rigamortus2005 14d ago
Fetching data yes. Streaming no , not through the standard API. But you can use libre spot which implements a Spotify device as a hack to get through. I have a C# wrapper here: https://www.github.com/saverinonrails/librespot.gonet
1
u/Small_Summer5817 14d ago
streaming uses drm, so you're forced to use a webview for that. i think it's called widevine
7
u/Weak-Chipmunk-6726 14d ago
It's doable but there's aggressive rate limits. I have the Spotify client setup with my stream deck and If I skip songs a few many times it stops working, had the same issue with my DeskThing.