Music Integration
OpenClaw + Spotify
Control playback, search music, and manage playlists from your AI assistant.
Category
Music
Setup Time
~4 minutes
What you can do
- Play/pause/skip tracks
- Search songs & playlists
- Manage your library
- Control playback devices
Setup Guide
Prerequisites
- OpenClaw running (see our deployment guide)
- A Spotify account (free or Premium)
- Spotify Premium required for full playback control
Step 1: Create a Spotify App
- Go to developer.spotify.com/dashboard
- Log in with your Spotify account
- Click Create App
- Fill in the details: - App name: OpenClaw - App description: AI assistant integration - Website: Your domain or
- Click Create
- Click Settings → Basic Information
- Copy the Client ID and Client Secret
http://localhost
Step 2: Configure Redirect URI
- In your app settings, click Edit Settings
- Add Redirect URIs: -
- Click Add then Save
http://localhost:3000/oauth/callback (local)
- https://your-domain.com/oauth/callback (production)
Step 3: Set User Access
- In your app settings, find User Management
- Add your Spotify email as a test user
- This is required while your app is in Development mode
Configuration
Add the Spotify channel to your OpenClaw config:
# In your openclaw config
channels:
spotify:
enabled: true
client_id: "YOUR_CLIENT_ID"
client_secret: "YOUR_CLIENT_SECRET"
redirect_uri: "https://your-domain.com/oauth/callback"
Or via environment variables in your docker-compose.yml:
environment:
- SPOTIFY_ENABLED=true
- SPOTIFY_CLIENT_ID=your_client_id
- SPOTIFY_CLIENT_SECRET=your_client_secret
- SPOTIFY_REDIRECT_URI=https://your-domain.com/oauth/callback
Step 4: Authorize Access
- Restart OpenClaw:
docker compose restart openclaw - Visit the OAuth URL shown in logs or OpenClaw UI
- Log in to Spotify
- Grant the requested permissions
- You'll be redirected back with a success message
Verification
Try asking OpenClaw to interact with Spotify:
"Play 'Bohemian Rhapsody' on Spotify"
"What's currently playing?"
"Pause the music"
"Skip to next track"
"Search for jazz playlists"
"Add this song to my Liked Songs"
Check logs for API calls:
docker compose logs -f openclaw | grep -i spotify
Common Issues
No active device: Spotify requires an active device for playback control. Open Spotify on your phone, computer, or speaker first.
Premium required: Free accounts have limited API access. Playback control requires Spotify Premium. Search and playlist management work on free accounts.
Token expired: Spotify access tokens expire after 1 hour. OpenClaw automatically refreshes tokens using the refresh token.
App in development: While in development mode, only users you add in the dashboard can authorize. Request quota extension for production use.
Frequently Asked Questions
Does OpenClaw work with Spotify?
Yes — OpenClaw integrates with Spotify via the official Web API with OAuth authentication. It can control playback, search music, and manage playlists. Setup takes about 4 minutes.
Is the Spotify integration free?
The integration is free and included with OpenClaw. However, full playback control requires a Spotify Premium subscription. Free accounts can still search and manage playlists.
How do I set up Spotify with OpenClaw?
Create a Spotify app in the developer dashboard, configure OAuth credentials and redirect URIs, add your email as a test user, configure OpenClaw with the credentials, and authorize access.
Do I need Spotify Premium?
For full playback control (play, pause, skip), yes. Spotify's API restricts playback endpoints to Premium users. Free users can still search music and manage playlists.
Can OpenClaw control Spotify Connect devices?
Yes. OpenClaw can see and control any Spotify Connect device on your account, including smart speakers, TVs, and other devices running Spotify.
Ready to set up Spotify?
Follow our free guide to deploy OpenClaw and connect Spotify in minutes.
Official docs: https://docs.openclaw.ai/channels