> ## Documentation Index
> Fetch the complete documentation index at: https://nango-wari-migrated-bigcommerce-docs.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Spotify

## Overview

<CardGroup cols={3}>
  <Card title="Pre-built tooling" icon="screwdriver-wrench" href="#pre-built-tooling" />

  <Card title="Pre-built integrations" icon="square-check" href="#pre-built-integrations" />

  <Card title="Access requirements" icon="triangle-exclamation" href="#access-requirements" />

  <Card title="Setup guide" icon="rocket" href="#setup-guide" />

  <Card title="Useful links" icon="circle-info" href="#useful-links" />

  <Card title="API gotchas" icon="biohazard" href="#api-gotchas" />
</CardGroup>

## Pre-built tooling

<AccordionGroup>
  <Accordion title="✅ Authorization">
    | Tools                           | Status |
    | ------------------------------- | ------ |
    | Pre-built authorization (OAuth) | ✅      |
    | Credentials auto-refresh        | ✅      |
    | Auth parameters validation      | ✅      |
    | Pre-built authorization UI      | ✅      |
    | Custom authorization UI         | ✅      |
    | Expired credentials detection   | ✅      |
  </Accordion>

  <Accordion title="✅ Read & write data">
    | Tools                                     | Status                         |
    | ----------------------------------------- | ------------------------------ |
    | Pre-built integrations                    | ✅                              |
    | API unification                           | ✅                              |
    | 2-way sync                                | ✅                              |
    | Webhooks from Nango on data modifications | ✅                              |
    | Real-time webhooks from 3rd-party API     | 🚫 (time to contribute: \<48h) |
    | Proxy requests                            | ✅                              |
  </Accordion>

  <Accordion title="✅ Observability & data quality">
    | Tools                   | Status |
    | ----------------------- | ------ |
    | HTTP request logging    | ✅      |
    | End-to-end type safety  | ✅      |
    | Data runtime validation | ✅      |
    | OpenTelemetry export    | ✅      |
    | Slack alerts on errors  | ✅      |
    | Integration status API  | ✅      |
  </Accordion>

  <Accordion title="✅ Customization">
    | Tools                              | Status                         |
    | ---------------------------------- | ------------------------------ |
    | Create or customize use-cases      | ✅                              |
    | Pre-configured pagination          | 🚫 (time to contribute: \<48h) |
    | Pre-configured rate-limit handling | 🚫 (time to contribute: \<48h) |
    | Per-customer configurations        | ✅                              |
  </Accordion>
</AccordionGroup>

### Others

| Function name             | Description                                                                            | Type                                           | Source code                                                                                                                     |
| ------------------------- | -------------------------------------------------------------------------------------- | ---------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- |
| `add-to-queue`            | Add a track or episode to the end of the user's current playback queue.                | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/spotify/actions/add-to-queue.ts)            |
| `create-playlist-track`   | Add one or more tracks to a Spotify playlist                                           | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/spotify/actions/create-playlist-track.ts)   |
| `create-playlist`         | Create a playlist in Spotify                                                           | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/spotify/actions/create-playlist.ts)         |
| `create-saved-album`      | Save one or more albums to the current user's library.                                 | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/spotify/actions/create-saved-album.ts)      |
| `create-saved-track`      | Save one or more tracks to the current user's library.                                 | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/spotify/actions/create-saved-track.ts)      |
| `delete-playlist-track`   | Remove one or more tracks from a Spotify playlist                                      | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/spotify/actions/delete-playlist-track.ts)   |
| `delete-playlist`         | Unfollow (remove) a playlist from the current user's library                           | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/spotify/actions/delete-playlist.ts)         |
| `delete-saved-album`      | Remove one or more albums from the current user's library.                             | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/spotify/actions/delete-saved-album.ts)      |
| `delete-saved-show`       | Remove one or more shows (podcasts) from the current user's library.                   | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/spotify/actions/delete-saved-show.ts)       |
| `delete-saved-track`      | Remove one or more tracks from the current user's library.                             | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/spotify/actions/delete-saved-track.ts)      |
| `follow-artist`           | Follow one or more artists on behalf of the current user.                              | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/spotify/actions/follow-artist.ts)           |
| `follow-playlist`         | Follow a playlist on behalf of the current user                                        | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/spotify/actions/follow-playlist.ts)         |
| `get-album`               | Retrieve a single album from the Spotify catalog.                                      | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/spotify/actions/get-album.ts)               |
| `get-artist`              | Retrieve a single artist from the Spotify catalog.                                     | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/spotify/actions/get-artist.ts)              |
| `get-current-playback`    | Fetch the user's current playback state including device, track, and progress.         | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/spotify/actions/get-current-playback.ts)    |
| `get-current-user`        | Fetch the current Spotify user profile                                                 | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/spotify/actions/get-current-user.ts)        |
| `get-devices`             | List the user's available Spotify Connect devices                                      | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/spotify/actions/get-devices.ts)             |
| `get-episode`             | Retrieve a single podcast episode from the Spotify catalog.                            | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/spotify/actions/get-episode.ts)             |
| `get-playlist`            | Retrieve a single playlist from Spotify                                                | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/spotify/actions/get-playlist.ts)            |
| `get-queue`               | Retrieve the user's current playback queue.                                            | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/spotify/actions/get-queue.ts)               |
| `get-show`                | Retrieve a single show (podcast) from the Spotify catalog                              | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/spotify/actions/get-show.ts)                |
| `get-track`               | Retrieve a single track from the Spotify catalog.                                      | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/spotify/actions/get-track.ts)               |
| `list-albums`             | List albums saved in the current user's library.                                       | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/spotify/actions/list-albums.ts)             |
| `list-artists`            | List artists followed by the current user                                              | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/spotify/actions/list-artists.ts)            |
| `list-playlist-tracks`    | List tracks in a Spotify playlist.                                                     | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/spotify/actions/list-playlist-tracks.ts)    |
| `list-playlists`          | List playlists owned or followed by the current user.                                  | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/spotify/actions/list-playlists.ts)          |
| `list-saved-shows`        | List shows (podcasts) saved in the current user's library                              | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/spotify/actions/list-saved-shows.ts)        |
| `list-saved-tracks`       | List tracks saved in the current user's library.                                       | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/spotify/actions/list-saved-tracks.ts)       |
| `pause-playback`          | Pause the user's Spotify playback.                                                     | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/spotify/actions/pause-playback.ts)          |
| `reorder-playlist-tracks` | Reorder tracks within a Spotify playlist.                                              | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/spotify/actions/reorder-playlist-tracks.ts) |
| `search`                  | Search the Spotify catalog for tracks, albums, artists, playlists, shows, or episodes. | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/spotify/actions/search.ts)                  |
| `seek-to-position`        | Seek to a specific position in the currently playing track.                            | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/spotify/actions/seek-to-position.ts)        |
| `set-repeat-mode`         | Set the repeat mode for the user's playback.                                           | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/spotify/actions/set-repeat-mode.ts)         |
| `set-volume`              | Set the volume for the user's current playback device.                                 | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/spotify/actions/set-volume.ts)              |
| `skip-to-next`            | Skips to the next track in the user's queue.                                           | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/spotify/actions/skip-to-next.ts)            |
| `skip-to-previous`        | Skip to the previous track in the user's queue                                         | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/spotify/actions/skip-to-previous.ts)        |
| `start-playback`          | Start or resume Spotify playback, optionally on a specific device or with a context    | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/spotify/actions/start-playback.ts)          |
| `toggle-shuffle`          | Toggle shuffle mode on or off for the user's playback                                  | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/spotify/actions/toggle-shuffle.ts)          |
| `transfer-playback`       | Transfer playback to a different Spotify Connect device                                | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/spotify/actions/transfer-playback.ts)       |
| `unfollow-playlist`       | Unfollow a playlist on behalf of the current user                                      | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/spotify/actions/unfollow-playlist.ts)       |
| `update-playlist`         | Update a playlist's details (name, description, public/private status).                | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/spotify/actions/update-playlist.ts)         |
| `albums`                  | Sync albums saved in the current user's library                                        | [Sync](/guides/functions/syncs/sync-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/spotify/syncs/albums.ts)                    |
| `artists`                 | Sync artists followed by the current user.                                             | [Sync](/guides/functions/syncs/sync-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/spotify/syncs/artists.ts)                   |
| `playlist-tracks`         | Sync tracks for a given playlist                                                       | [Sync](/guides/functions/syncs/sync-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/spotify/syncs/playlist-tracks.ts)           |
| `playlists`               | Sync playlists owned or followed by the current user                                   | [Sync](/guides/functions/syncs/sync-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/spotify/syncs/playlists.ts)                 |
| `recently-played`         | Sync recently played Spotify tracks                                                    | [Sync](/guides/functions/syncs/sync-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/spotify/syncs/recently-played.ts)           |
| `saved-episodes`          | Sync podcast episodes saved in the current user's library.                             | [Sync](/guides/functions/syncs/sync-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/spotify/syncs/saved-episodes.ts)            |
| `saved-shows`             | Sync shows (podcasts) saved in the current user's library                              | [Sync](/guides/functions/syncs/sync-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/spotify/syncs/saved-shows.ts)               |
| `saved-tracks`            | Sync tracks saved in the current user's library                                        | [Sync](/guides/functions/syncs/sync-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/spotify/syncs/saved-tracks.ts)              |
| `top-items`               | Sync the user's top artists and tracks across all time ranges.                         | [Sync](/guides/functions/syncs/sync-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/spotify/syncs/top-items.ts)                 |

## Access requirements

| Pre-Requisites    | Status | Comment |
| ----------------- | ------ | ------- |
| Paid dev account  | ❓      |         |
| Paid test account | ❓      |         |
| Partnership       | ❓      |         |
| App review        | ❓      |         |
| Security audit    | ❓      |         |

## Setup guide

*No setup guide yet.*

<Tip>Need help getting started? Get help in the [community](https://nango.dev/slack).</Tip>

<Note>Contribute improvements to the setup guide by [editing this page](https://github.com/nangohq/nango/tree/master/docs/integrations/all/spotify.mdx)</Note>

## Useful links

* [OAuth-related docs](https://developer.spotify.com/documentation/web-api/tutorials/code-flow)
* [How Register an Application](https://developer.spotify.com/documentation/web-api/concepts/apps)
* [Scopes](https://developer.spotify.com/documentation/web-api/concepts/scopes)
* [Web API docs (their REST API)](https://developer.spotify.com/documentation/web-api)

<Note>Contribute useful links by [editing this page](https://github.com/nangohq/nango/tree/master/docs/integrations/all/spotify.mdx)</Note>

## API gotchas

* Spotify offers a client credentials token that authorizes as app instead of a user. This is listed under `spotify-oauth2-cc`. For more details check [spotify client credentials flow](https://developer.spotify.com/documentation/web-api/tutorials/client-credentials-flow)
  <Note>Contribute API gotchas by [editing this page](https://github.com/nangohq/nango/tree/master/docs/integrations/all/spotify.mdx)</Note>
