Back to Dyrane Top 40
Autopilot Setup Guide
Configure your Spotify credentials to enable automatic weekly playlist updates.
Auto Updates
Fresh tracks every Friday at 9 AM UTC
Always Fresh
Trending Afrobeat from top artists
Secure
OAuth tokens stored safely
1Create a Spotify Developer App
- Go to the Spotify Developer Dashboard
- Log in with your Spotify account
- Click "Create app"
- Fill in the details:
- App name:
Dyrane Top 40 Autopilot - Redirect URI:
http://localhost:3000/callback - Select Web API
- App name:
- Click "Save"
2Get Your Client Credentials
- In your app settings, go to "Settings"
- Copy your Client ID
- Click "View client secret" and copy it
Environment Variables Needed:
SPOTIFY_CLIENT_ID=your_client_id
SPOTIFY_CLIENT_SECRET=your_client_secret3Generate a Refresh Token
You need a refresh token with the correct scopes. Use this authorization URL (replace YOUR_CLIENT_ID):
https://accounts.spotify.com/authorize?client_id=YOUR_CLIENT_ID&response_type=code&redirect_uri=http://localhost:3000/callback&scope=playlist-modify-public%20playlist-modify-private%20playlist-read-privateAfter authorizing, you'll get a code in the URL. Exchange it for tokens using:
curl -X POST https://accounts.spotify.com/api/token \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "grant_type=authorization_code" \
-d "code=YOUR_CODE" \
-d "redirect_uri=http://localhost:3000/callback" \
-d "client_id=YOUR_CLIENT_ID" \
-d "client_secret=YOUR_CLIENT_SECRET"Environment Variable:
SPOTIFY_REFRESH_TOKEN=your_refresh_token4Add Security Tokens
Generate secure random strings for the cron job and API protection:
SPOTIFY_PLAYLIST_ID=0pcWjkWSCyyftueBw4wEHs
CRON_SECRET=generate_a_random_32_char_string
UPDATE_API_KEY=generate_another_random_string5Deploy to Vercel
- Add all environment variables in your Vercel project settings
- Deploy your project
- The cron job will automatically run every Friday!
All Environment Variables
SPOTIFY_CLIENT_ID=your_client_id
SPOTIFY_CLIENT_SECRET=your_client_secret
SPOTIFY_REFRESH_TOKEN=your_refresh_token
SPOTIFY_PLAYLIST_ID=0pcWjkWSCyyftueBw4wEHs
CRON_SECRET=random_32_char_string
UPDATE_API_KEY=random_string_for_manual_updates