cloudflare-apps / spotify-oauth-worker

A workers server for managing a user's Spotify playlists.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Spotify OAuth Workers Client

This is a workers service that fetches a user's Spotify playlists for the Spotify app. Also sets metadata for the user

Local Setup

Requirements

  • Cloudflare account
  • Spotify account

Usage

  • Save the contents of worker.js as a Cloudflare Worker

Cloudflare Service Configuration

Cloudflare completes the OAuth dance and then sends the token to this client service. Steps on how to get this token

Fill in your credentials in credentials.json from the Spotify Developer Dashboard

After signing in with Cloudflare account, create a new service with the following configuration.

Field Value
OAuth Authentication URL https://accounts.spotify.com/authorize
OAuth Client ID via Spotify Developer Console
OAuth Scope playlist-read-private, playlist-read-collaborative, user-follow-read user-read-email
OAuth Token URL https://accounts.spotify.com/api/token
OAuth Client Secret via Spotify Developer Console
Metadata Endpoint https://yourservicedomain.com/account-metadata

About

A workers server for managing a user's Spotify playlists.

License:MIT License


Languages

Language:JavaScript 100.0%