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

# Spotify

> Browse your library, create playlists, and export influence chains directly to Spotify

Connect Spotify to let the Digcrate agent read your library and create playlists on your behalf. Once connected, the agent can pull in your personal listening data to give context to research and save tracklists straight to your account.

<Note>
  Digcrate uses Auth0 Token Vault for the Spotify connection. Your Spotify credentials and raw access tokens are never stored by Digcrate — Auth0 handles the token exchange at runtime.
</Note>

## What you can do

<CardGroup cols={2}>
  <Card title="Browse your library" icon="library">
    Read your saved tracks, playlists, and top artists. The agent can reference your library when making recommendations or building context.
  </Card>

  <Card title="View your playlists" icon="list-music">
    List all your playlists and read the tracks inside them by name — no playlist IDs required.
  </Card>

  <Card title="See your top artists" icon="chart-bar">
    Fetch your medium-term top artists (up to 50) including genres and artwork.
  </Card>

  <Card title="Create playlists from research" icon="circle-plus">
    Export any TrackList component or influence chain as a new public playlist in your Spotify account.
  </Card>
</CardGroup>

## How to connect

<Steps>
  <Step title="Open Settings">
    Click the gear icon in the sidebar, or press `Shift+S`.
  </Step>

  <Step title="Go to Connected Services">
    Select the **Connected Services** tab.
  </Step>

  <Step title="Click Connect next to Spotify">
    An OAuth popup opens and redirects you to Spotify's authorization page.
  </Step>

  <Step title="Authorize Digcrate">
    Spotify will show the permissions Digcrate is requesting. Click **Agree** to connect. You are returned to Digcrate automatically.
  </Step>
</Steps>

## Permissions requested

When you authorize Digcrate, Spotify grants the following scopes:

| Scope                     | What it allows                             |
| ------------------------- | ------------------------------------------ |
| `user-library-read`       | Read your saved tracks                     |
| `user-top-read`           | Read your top artists                      |
| `playlist-read-private`   | Read your private and public playlists     |
| `playlist-modify-public`  | Create and add tracks to public playlists  |
| `playlist-modify-private` | Create and add tracks to private playlists |

## What the agent can do

Once connected, the agent has access to three tools:

**Read your library** — The agent can fetch your saved tracks, top artists, or playlist list. For example, ask "what are my top artists?" or "show me my saved tracks."

**Read playlist tracks** — If you ask the agent to look at a specific playlist, it fetches the full track list automatically. You never need to provide a playlist ID.

**Export to Spotify** — The agent searches Spotify for each track by artist and title, creates a new playlist in your account, and adds the matched tracks. Tracks that cannot be found on Spotify are reported back.

## Creating a playlist from research

During any research session, if the agent returns a TrackList — for example, an influence chain or a set of recommendations — you can ask it to save that list as a Spotify playlist.

<Tip>
  Try saying "save this as a Spotify playlist called \[name]" after any TrackList appears, or click the **Export to Spotify** action button on the component. The agent will create the playlist and return a direct link.
</Tip>

Playlists are created as public by default. The agent reports how many tracks were added and which ones, if any, it could not find on Spotify.
