This is just a simple script I've written while I was trying to find a way to implement Spotify public playlists into my last project I've published here: https://news.ycombinator.com/item?id=36496644
It works by using an endpoint that returns a script filled with credentials for anonymous browsing. This way you can get accessToken and clientID to use with the Spotify Web API.
Hope you find it useful!