Search and manage Spotify playlists, tracks, albums, artists, and playback state via the Spotify Web API. Use this skill when users want to search for music, manage playlists, control playback, save tracks to library, or automate Spotify workflows.

Install

openclaw skills install spotify-audio

Spotify

Search and manage Spotify content — playlists, tracks, albums, artists, playback, and library — from chat using the Spotify Web API.

This skill uses ClawLink for hosted connection flows and credentials so you do not need to configure Spotify API access yourself.

Setup in 3 Steps

Step 1: InstallStep 2: Pair AccountStep 3: Connect Spotify
InstallPairApp-specific connection GIF coming soon
Run the install command in OpenClawSign in and approve the deviceOpen the dashboard and connect Spotify

How It Works

┌─────────────────┐     ┌──────────────┐     ┌──────────────────┐
│   OpenClaw      │────▶│   ClawLink   │────▶│  Spotify Web     │
│   (User Chat)   │     │   (OAuth)    │     │      API         │
└─────────────────┘     └──────────────┘     └──────────────────┘
         │                       │                       │
         │  1. Install Plugin    │                       │
         │  2. Pair Device       │                       │
         │  3. Connect Spotify   │                       │
         │                       │  4. Secure Token      │
         │                       │  5. Proxy Requests   │
         │                       │                       │
         ▼                       ▼                       ▼
   ┌──────────┐           ┌──────────┐           ┌──────────┐
   │  SKILL   │           │ Dashboard│           │  Spotify │
   │  File    │           │ Auth     │           │  Account │
   └──────────┘           └──────────┘           └──────────┘

Install

Install the verified ClawLink plugin from ClawHub. After the user confirms, complete the full setup so ClawLink tools are visible in the next OpenClaw chat.

openclaw plugins install clawhub:clawlink-plugin
openclaw config set tools.alsoAllow '["clawlink-plugin"]' --strict-json
openclaw gateway restart

Then tell the user: "OpenClaw has been restarted. Send /new as a standalone message to start a fresh chat, then ask for Spotify again."

Quick Start

# Search for tracks
clawlink_call_tool --tool "spotify_search" --params '{"q": "never gonna give you up", "type": "track"}'

# Get current user's playlists
clawlink_call_tool --tool "spotify_get_current_user_playlists" --params '{}'

# Get track details
clawlink_call_tool --tool "spotify_get_track" --params '{"track_id": "TRACK_ID"}'

Authentication

All Spotify tool calls are authenticated automatically by ClawLink using the user's connected Spotify account OAuth token.

No API token is required in chat. ClawLink stores the OAuth token securely and injects it into every Spotify Web API request on the user's behalf.

Getting Connected

  1. Install the ClawLink plugin (see Install above).
  2. Pair the plugin with clawlink_begin_pairing if it is not configured yet.
  3. Open https://claw-link.dev/dashboard?add=spotify and connect Spotify.
  4. Call clawlink_list_integrations to verify the connection is active.

Connection Management

List Connections

clawlink_list_integrations

Response: Returns all connected integrations. Look for spotify in the list.

Verify Connection

clawlink_list_tools --integration spotify

Response: Returns the live tool catalog for Spotify.

Reconnect

If Spotify tools are missing or the connection shows an error:

  1. Direct the user to https://claw-link.dev/dashboard?add=spotify
  2. After they confirm, call clawlink_list_integrations to verify
  3. Then call clawlink_list_tools --integration spotify

Security & Permissions

  • Access is scoped to the Spotify account connected during OAuth setup and the scopes granted.
  • Write operations (create playlist, save track, remove from playlist, playback control) require explicit user confirmation.
  • Playback control tools may require an active Spotify Premium subscription depending on the operation.
  • Confirm destructive or bulk changes before executing.

Tool Reference

Search

ToolDescriptionMode
spotify_searchSearch for tracks, albums, artists, playlists, or showsRead
spotify_search_tracksSearch specifically for tracksRead
spotify_search_artistsSearch specifically for artistsRead
spotify_search_albumsSearch specifically for albumsRead
spotify_search_playlistsSearch specifically for playlistsRead

Tracks

ToolDescriptionMode
spotify_get_trackGet details for a single trackRead
spotify_get_tracksGet details for multiple tracks at onceRead
spotify_get_audio_featuresGet audio features (tempo, key, danceability, etc.)Read
spotify_get_audio_analysisGet detailed audio analysis for a trackRead
spotify_save_trackSave a track to the user's libraryWrite
spotify_remove_saved_trackRemove a track from the user's libraryWrite
spotify_check_saved_tracksCheck which tracks are saved in the libraryRead

Albums

ToolDescriptionMode
spotify_get_albumGet album details with tracksRead
spotify_get_album_tracksGet tracks on an albumRead
spotify_save_albumSave an album to the user's libraryWrite
spotify_remove_saved_albumRemove an album from the user's libraryWrite
spotify_check_saved_albumsCheck which albums are savedRead

Artists

ToolDescriptionMode
spotify_get_artistGet an artist's profile and follower countRead
spotify_get_artist_albumsGet albums by an artistRead
spotify_get_artist_top_tracksGet an artist's top tracksRead
spotify_get_related_artistsGet artists related to this oneRead

Playlists

ToolDescriptionMode
spotify_get_current_user_playlistsGet the current user's playlistsRead
spotify_get_playlistGet a playlist's details and tracksRead
spotify_create_playlistCreate a new playlist for the userWrite
spotify_update_playlistUpdate a playlist's name, description, or visibilityWrite
spotify_delete_playlistDelete a playlistWrite
spotify_add_tracks_to_playlistAdd tracks to a playlistWrite
spotify_remove_tracks_from_playlistRemove tracks from a playlistWrite
spotify_reorder_playlist_tracksReorder tracks within a playlistWrite
spotify_get_playlist_cover_imageGet the playlist's cover imageRead
spotify_upload_playlist_cover_imageUpload a custom cover imageWrite

User Profile

ToolDescriptionMode
spotify_get_current_userGet the current user's profileRead
spotify_get_user_profileGet another user's public profileRead
spotify_follow_userFollow a userWrite
spotify_unfollow_userUnfollow a userWrite
spotify_follow_playlistFollow a playlistWrite
spotify_unfollow_playlistUnfollow a playlistWrite

Playback

ToolDescriptionMode
spotify_get_playback_stateGet the user's current playback stateRead
spotify_start_playbackStart or resume playbackWrite
spotify_pause_playbackPause playbackWrite
spotify_skip_to_nextSkip to the next trackWrite
spotify_skip_to_previousSkip to the previous trackWrite
spotify_seek_to_positionSeek to a position in the current trackWrite
spotify_set_repeat_modeSet the repeat mode (off, track, context)Write
spotify_set_volumeSet the playback volumeWrite
spotify_shuffleToggle shuffle on or offWrite
spotify_transfer_playbackTransfer playback to another deviceWrite

Recently Played

ToolDescriptionMode
spotify_get_recently_playedGet the user's recently played tracksRead
spotify_get_recently_played_episodesGet recently played episodes (podcasts)Read

Browse & Recommendations

ToolDescriptionMode
spotify_get_new_releasesGet new album releasesRead
spotify_get_featured_playlistsGet featured Spotify playlistsRead
spotify_get_recommendationsGet track recommendations based on seedsRead
spotify_get_available_genre_seedsGet available genre seeds for recommendationsRead
spotify_get_categoriesGet all Spotify categoriesRead
spotify_get_category_playlistsGet playlists for a specific categoryRead

Code Examples

Search for a track

clawlink_call_tool --tool "spotify_search" \
  --params '{
    "q": "bohemian rhapsody queen",
    "type": "track",
    "limit": 5
  }'

Get a playlist's tracks

clawlink_call_tool --tool "spotify_get_playlist" \
  --params '{
    "playlist_id": "PLAYLIST_ID"
  }'

Create a new playlist

clawlink_call_tool --tool "spotify_create_playlist" \
  --params '{
    "name": "My OpenClaw Playlist",
    "description": "Created via OpenClaw AI assistant",
    "public": false
  }'

Add tracks to a playlist

clawlink_call_tool --tool "spotify_add_tracks_to_playlist" \
  --params '{
    "playlist_id": "PLAYLIST_ID",
    "uris": ["spotify:track:TRACK_ID_1", "spotify:track:TRACK_ID_2"]
  }'

Get audio features for a track

clawlink_call_tool --tool "spotify_get_audio_features" \
  --params '{
    "track_id": "TRACK_ID"
  }'

Get new releases

clawlink_call_tool --tool "spotify_get_new_releases" \
  --params '{
    "limit": 10,
    "country": "US"
  }'

Discovery Workflow

  1. Call clawlink_list_integrations to confirm Spotify is connected.
  2. Call clawlink_list_tools --integration spotify to see the live catalog.
  3. Treat the returned list as the source of truth. Do not guess or assume what tools exist.
  4. If the user describes a capability but the exact tool is unclear, call clawlink_search_tools with a short query and integration spotify.
  5. If no Spotify tools appear, direct the user to https://claw-link.dev/dashboard?add=spotify.

Execution Workflow

┌─────────────────────────────────────────────────────────────┐
│  READ OPERATIONS (Safe)                                     │
│  search → get → list → browse                              │
│                                                             │
│  Example: Search tracks → Get track details → Show info    │
└─────────────────────────────────────────────────────────────┘
                              │
                              ▼
┌─────────────────────────────────────────────────────────────┐
│  WRITE OPERATIONS (Require Confirmation)                    │
│  describe → preview → confirm → call                        │
│                                                             │
│  Example: Preview playlist creation → User approves → Create│
└─────────────────────────────────────────────────────────────┘
  1. For unfamiliar tools, ambiguous requests, or any write action, call clawlink_describe_tool first.
  2. Use the returned guidance, schema, whenToUse, askBefore, safeDefaults, examples, and followups to shape the call.
  3. Prefer read, search, and get operations before writes when that reduces ambiguity.
  4. For writes or anything marked as requiring confirmation, call clawlink_preview_tool first.
  5. Execute with clawlink_call_tool. Pass confirmation only after the preview matches the user's intent.
  6. If the tool call fails, report the real error. Do not invent results or restate the failure as a missing capability unless the live catalog supports that conclusion.

Notes

  • Playback control tools (play, pause, skip, volume) require Spotify Premium on the account that created the token.
  • Track and playlist IDs must be the Spotify URI format (e.g., spotify:track:3AhXNa5py1) or just the alphanumeric ID.
  • Search results are limited by Spotify's API — use limit parameter to control result count.
  • The user's country code affects available content (some tracks may be region-locked).
  • Playlist modification operations may be rate-limited by Spotify.
  • Saved tracks and albums are per-user library — they require an active user context.

Error Handling

Status / ErrorMeaning
Tool not foundThe tool name does not exist in the current catalog. Verify with clawlink_list_tools --integration spotify.
Missing connectionSpotify is not connected. Direct the user to https://claw-link.dev/dashboard?add=spotify.
NO_ACTIVE_DEVICENo active Spotify device found to control playback. Open Spotify on a device first.
PREMIUM_REQUIREDPlayback control requires Spotify Premium.
INVALID_TRACK_IDThe track ID does not match any track in Spotify's catalog.
INVALID_PLAYLIST_IDThe playlist ID does not exist or is not accessible.
NOT_FOUNDThe requested resource (track, album, artist) was not found.
RATE_LIMITEDToo many requests — wait and retry.
Write rejectedUser did not confirm a write action. Always confirm before executing writes.

Troubleshooting: Tools Not Visible

  1. Check that the ClawLink plugin is installed:
    openclaw plugins list
    
  2. If the plugin is installed but tools are missing, tell the user to send /new as a standalone message to reload the catalog.
  3. If a fresh chat does not help, run:
    openclaw config set tools.alsoAllow '["clawlink-plugin"]' --strict-json
    openclaw gateway restart
    
  4. After restart, tell the user to send /new again and retry.

Troubleshooting: Playback Control Fails

  1. Confirm the Spotify account has Premium — free accounts cannot control playback programmatically.
  2. Ensure there is an active device with Spotify open — playback requires an active session.
  3. Check that the correct device ID is being used if spotify_transfer_playback is needed first.

Resources


Powered by ClawLink — an integration hub for OpenClaw

ClawLink Logo