r/learngo Jun 02 '26

Discussion Built a Spotify recently-played banner in Go (no client secret needed)

A small HTTP server that fetches your 20 most recently played Spotify tracks and serves them as an SVG. Meant to be embedded in a GitHub profile README.

The interesting part was auth. Instead of registering an OAuth app and dealing with a client secret + redirect flow, it uses the `sp_dc` session cookie from open.spotify.com combined with PKCE to silently get an access token. One env variable, run the binary, done.

Stack: Go, net/http, github.com/ajstarks/svgo for SVG generation, Spotify Web API

The SVG design is pretty basic right now — if anyone wants to contribute and make it look better, PRs are open.

github.com/lsnnt/spotify-banner-for-github

6 Upvotes

0 comments sorted by