Cloudflare Workers-based API for fetching Spotify account Data, such as the current song, 10 most recent songs and top 10 songs.
- Install and configure Wrangler/Workers CLI
- Install Node.JS and NPM
- Create an app on Spotify Developers
- Get your Refresh Token by following the Spotify Auth Guide
- Copy the
wranger.toml.example
file towrangler.toml
- Enter your Cloudflare Account ID into the
account_id
field in yourwrangler.toml
file - Add the secrets
SPOTIFY_CLIENT_ID
,SPOTIFY_CLIENT_SECRET
,SPOTIFY_REFRESH_TOKEN
by running$ wrangler secret put SECRET_NAME
- Publish the worker to Cloudflare
$ wrangler publish