No description
  • HTML 81.8%
  • JavaScript 18.2%
Find a file
nghialele bf04555b24 Initial commit: Spotify Refresh Token app
Express backend with OAuth callback exchange, single-page dark-themed
frontend, MIT license, README, and .gitignore.

Co-authored-by: CommandCodeBot <noreply@commandcode.ai>
2026-06-08 18:35:33 +07:00
public Initial commit: Spotify Refresh Token app 2026-06-08 18:35:33 +07:00
.gitignore Initial commit: Spotify Refresh Token app 2026-06-08 18:35:33 +07:00
LICENSE Initial commit: Spotify Refresh Token app 2026-06-08 18:35:33 +07:00
package-lock.json Initial commit: Spotify Refresh Token app 2026-06-08 18:35:33 +07:00
package.json Initial commit: Spotify Refresh Token app 2026-06-08 18:35:33 +07:00
README.md Initial commit: Spotify Refresh Token app 2026-06-08 18:35:33 +07:00
server.js Initial commit: Spotify Refresh Token app 2026-06-08 18:35:33 +07:00

Spotify Refresh Token

A minimal web app to generate Spotify refresh tokens via the Authorization Code flow.

Why?

Spotify's Authorization Code flow requires a browser login, a redirect, and a server-side token exchange — annoying to do manually. This app handles the full flow for you: enter your app credentials, log in, get your refresh token.

Setup

git clone <your-repo-url>
cd spotify-refresh-token
npm install

Usage

npm start

Open http://localhost:3000, fill in your Spotify app credentials, and click Authorize with Spotify.

You'll need:

  • Client ID — from your Spotify Developer Dashboard
  • Client Secret — same place
  • Redirect URI — must match one of the redirect URIs configured in your Spotify app settings (defaults to http://localhost:3000)

After authorizing, the app displays your refresh token. Copy it — it's gone when you close the page.

Privacy

Nothing is stored. Credentials live in your browser's session storage only for the OAuth round-trip and are cleared immediately after. No data is logged, persisted, or sent anywhere except directly to Spotify's API.

Self-Hosting

Deploy to any Node.js hosting platform (Render, Railway, Fly.io, a VPS, etc.):

npm start

Set the PORT environment variable if your platform requires it:

PORT=8080 npm start

Make sure the Redirect URI in your Spotify app settings matches wherever you deploy.

License

MIT