This is a Next.js project bootstrapped with create-next-app.
First, run the development server:
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun devOpen http://localhost:3000 with your browser to see the result.
You can start editing the page by modifying app/page.tsx. The page auto-updates as you edit the file.
This project uses next/font to automatically optimize and load Geist, a new font family for Vercel.
To learn more about Next.js, take a look at the following resources:
- Next.js Documentation - learn about Next.js features and API.
- Learn Next.js - an interactive Next.js tutorial.
You can check out the Next.js GitHub repository - your feedback and contributions are welcome!
The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.
Check out our Next.js deployment documentation for more details.
Run npm run spotify:check locally, or npm run spotify:check -- --production
inside the deployed server/container with its production environment variables.
The production flag selects Next.js production environment files; it does not
connect to your deployed server from your local machine.
The command bypasses the widget cache and makes one token request followed by one
currently-playing and one recently-played request. It prints the API status and
track details, never credentials, and stops immediately on HTTP 429. Do not run
it again until Retry-After has elapsed.
- HTTP 429: rate/quota limit;
Retry-Afteris the wait in seconds.QUOTA_EXCEEDEDindicates a Spotify development quota restriction. - HTTP 200: compare the API track ID/title with the widget. A successful history request alone does not prove that the current-playback endpoint works.
- HTTP 204: Spotify returned no current playback.
- HTTP 401/403: authentication or access failure, not proof of a rate limit.
In hosting logs, search for [Spotify]. Web API errors include endpoint and HTTP
status; 429 entries include cooldown expiry. A successful browser Server Action
response does not imply a successful upstream Spotify request. Cache and cooldown
state are in memory per server process, not shared across deployment instances.