> ## Documentation Index
> Fetch the complete documentation index at: https://docs.shanone.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Spotify

> Control playback, manage playlists and library, and browse artists, albums, shows, and audiobooks

# Spotify

Shanone's Spotify integration gives your agent 57 tools covering playback control, playlist management, your saved library, and metadata for artists/albums/shows/audiobooks — enough to let an agent DJ, curate, or answer "what have I been listening to" questions.

## Getting Started

Connect using the **Client ID from your own Spotify developer app**. The app owner needs an active **Spotify Premium subscription**. **No Client Secret is required.**

<Steps>
  <Step title="Copy the redirect URL from Shanone">
    Open **Integrations → Spotify** in the [Shanone dashboard](https://app.shanone.ai). Copy the redirect URL shown in the connection panel for the Shanone environment you are connecting to.
  </Step>

  <Step title="Set up your Spotify app">
    Open the [Spotify Developer Dashboard](https://developer.spotify.com/dashboard) and create your own app, or open an existing app. In **Settings**, add the URL copied from Shanone to **Redirect URIs** and save. The URL must match exactly, including the path and any trailing slash.
  </Step>

  <Step title="Add your Spotify account">
    In the app's **Users Management**, add the Spotify account you want to connect. Use that account when authorizing Shanone.
  </Step>

  <Step title="Enter your Client ID and connect">
    Copy the **Client ID** from your Spotify app's **Settings**. Return to Shanone's Spotify panel, paste it into the **Client ID** field, and select **Connect**. You do not need to copy or enter the Client Secret.
  </Step>

  <Step title="Authorize and try the connection">
    Approve the requested permissions on Spotify's consent screen. When you return to Shanone, confirm that Spotify is connected.

    Ask your agent “What am I listening to?” or retry the request that prompted you to connect. Playback control requires an active Spotify device, such as the Spotify app open on your phone or computer.
  </Step>
</Steps>

<Note>
  If you used the previous connection method, reconnect using your own Client ID. Your previous authorization cannot be transferred to a different app.
</Note>

## Available Tools

Shanone provides **57 tools** for Spotify, organized into these categories:

<AccordionGroup>
  <Accordion title="Player">
    `spotify_get_playback_state`, `spotify_get_currently_playing`, `spotify_get_available_devices`, `spotify_get_queue`, `spotify_get_recently_played`, `spotify_start_playback`, `spotify_pause_playback`, `spotify_skip_to_next`, `spotify_skip_to_previous`, `spotify_seek_to_position`, `spotify_set_repeat_mode`, `spotify_set_shuffle`, `spotify_set_volume`, `spotify_transfer_playback`, `spotify_add_to_queue`
  </Accordion>

  <Accordion title="Library">
    `spotify_get_saved_albums`, `spotify_save_albums`, `spotify_remove_saved_albums`, `spotify_get_saved_shows`, `spotify_save_shows`, `spotify_remove_saved_shows`, `spotify_get_saved_audiobooks`, `spotify_save_audiobooks`, `spotify_remove_saved_audiobooks`, `spotify_get_saved_tracks`, `spotify_save_tracks`, `spotify_remove_saved_tracks`
  </Accordion>

  <Accordion title="Playlists">
    `spotify_get_my_playlists`, `spotify_get_playlist`, `spotify_create_playlist`, `spotify_add_tracks_to_playlist`, `spotify_remove_tracks_from_playlist`, `spotify_update_playlist_details`, `spotify_reorder_playlist_items`, `spotify_replace_playlist_items`, `spotify_get_playlist_cover_image`, `spotify_upload_playlist_cover_image`, `spotify_get_playlist_items`
  </Accordion>

  <Accordion title="Follow">
    `spotify_follow_artists`, `spotify_unfollow_artists`, `spotify_get_followed_artists`, `spotify_check_following_artists`, `spotify_follow_playlist`, `spotify_unfollow_playlist`
  </Accordion>

  <Accordion title="Tracks & recommendations">
    `spotify_get_track`, `spotify_get_recommendations`, `spotify_search`
  </Accordion>

  <Accordion title="Albums & artists">
    `spotify_get_album`, `spotify_get_artist`
  </Accordion>

  <Accordion title="Shows, episodes & audiobooks">
    `spotify_get_show`, `spotify_get_show_episodes`, `spotify_get_episode`, `spotify_get_audiobook`, `spotify_get_audiobook_chapters`, `spotify_get_chapter`
  </Accordion>

  <Accordion title="User profile">
    `spotify_get_my_profile`, `spotify_get_top_items`
  </Accordion>
</AccordionGroup>

## Common Use Cases

<CardGroup cols={2}>
  <Card title="Voice-driven playback" icon="play">
    Play a specific track/album/playlist, skip, or adjust volume based on a request
  </Card>

  <Card title="Playlist curation" icon="list-music">
    Build a themed playlist from search results and add a custom cover image
  </Card>

  <Card title="Listening recap" icon="chart-bar">
    Pull top tracks/artists and recently played to summarize someone's listening habits
  </Card>

  <Card title="Discovery" icon="compass">
    Get recommendations seeded from a few favorite tracks or artists
  </Card>
</CardGroup>

## Troubleshooting

<AccordionGroup>
  <Accordion title="Client ID is rejected">
    Copy the Client ID from your Spotify app's Settings. It is a 32-character hexadecimal value. Check that you have not entered the Client Secret or included spaces.
  </Accordion>

  <Accordion title="Spotify reports an invalid redirect URI">
    Save the exact redirect URL currently shown in Shanone's Spotify panel in your app's Redirect URIs. A URL from another Shanone environment will not match.
  </Accordion>

  <Accordion title="Spotify authorization or API access is denied">
    Confirm that the app owner has an active Premium subscription and that the account you authorize is listed in the app's Users Management. After correcting the settings, reconnect from Shanone's Spotify panel.
  </Accordion>

  <Accordion title="spotify_start_playback or spotify_skip_to_next fails with no active device">
    Playback control tools need at least one Spotify Connect device already active (app open on phone/desktop/web). Use `spotify_get_available_devices` and `spotify_transfer_playback` to pick a target first.
  </Accordion>

  <Accordion title="Playback tools work but nothing actually changes">
    Confirm that the connected account has an active Spotify Premium subscription and that you are targeting the intended active device.
  </Accordion>

  <Accordion title="spotify_add_tracks_to_playlist fails on a playlist I own">
    Confirm the playlist ID belongs to the authenticated user or that they have collaborative edit rights — Spotify rejects writes to playlists the connected account can't modify.
  </Accordion>
</AccordionGroup>
