A desktop app that acts as a proxy for the Spotify Web API
This project provides a desktop application that helps fetching data from the Spotify's Web API, handling authentication and token refreshing for you.
It allows creating prototypes using data from Spotify's Web API, both using public available endpoints (search and look up) and authenticated ones (browse, user's library, user's top tracks) just running a desktop application.
Some modern design tools like Framer or Sketch are able to work with JSON, binding certain components to fields in the JSON for quick prototyping with real data. Using this proxy you can get plain JSON from Spotify's API or a proxied URL, all without having to care about implementing login nor refreshing tokens from your application.
Clone the project and install the dependencies
$ npm install
You need to create an application on Spotify's My Applications site. Give it a name and a description, and add http://localhost:8888/callback
as a redirect uri.
Finally, edit the index.js
file replacing <client_id>
and <client_secret>
with those from the application you have just created.
Running the app is easy. Execute:
$ npm start
Pretty awesome, isn't it? You might want to create an actual executable. For that, run:
$ npm i electron-packager -g
$ electron-packager . --platform=darwin
In this case, you will be building an application for mac.
Log in on the application.
Then provide the path for an endpoint from the Web API. For an endpoint like https://api.spotify.com/v1/me/top/tracks
, type me/top/tracks
in the url box. You will get a link to localhost that will return the JSON from the request, and you can also make the request and get the output from within the app.
As with any other project, there are some things that haven't been done yet: