Skip to content

Integrations

Spotify

Set up Spotify OAuth for music data, playlists, and listening history

Connect the application’s users to Spotify for music data, playlist management, playback control, and listening history.

PropertyValue
Provider IDspotify
CategorySocial
PKCESupported
Token refreshAutomatic
Redirect URIShown in Developer Portal

Go to the Spotify Developer Dashboard

Navigate to developer.spotify.com/dashboard and sign in.

Create a new app

Click Create app, fill in the app name and description, and accept the terms.

Configure the redirect URI

Under Edit settings, add the Alter callback URL from the Developer Portal to the Redirect URIs field.

Get credentials

Copy the Client ID and Client Secret from the app dashboard.

Open the Developer Portal

Go to portal.alterauth.com and navigate to the application.

Add Spotify provider

Go to OAuth Providers > Add Provider > Spotify.

Enter credentials

  • Client ID: Paste the Spotify Client ID
  • Client Secret: Paste the Spotify Client Secret

Select scopes

Choose the scopes the application needs.

Save

Click Save. The provider is now active.

ScopeDescription
user-read-emailRead the user’s email address
user-read-privateRead the user’s subscription details and country
ugc-image-uploadUpload user-provided images such as custom playlist cover art
playlist-read-privateView the user’s private playlists
playlist-read-collaborativeInclude collaborative playlists when requesting the user’s playlists
playlist-modify-publicCreate and modify the user’s public playlists
playlist-modify-privateCreate and modify the user’s private playlists
user-library-readView the user’s saved tracks, albums, and shows
user-library-modifySave and remove tracks, albums, and shows in the user’s library
user-follow-readView the artists and users the user follows
user-follow-modifyFollow and unfollow artists and users
user-top-readView the user’s top artists and tracks
user-read-recently-playedView the user’s recently played tracks
user-read-playback-positionRead the user’s playback position in podcasts and other content
user-read-playback-stateRead the user’s currently playing content and Spotify Connect devices
user-modify-playback-stateControl playback on the user’s Spotify clients and Connect devices
user-read-currently-playingRead the user’s currently playing content and queue
user-personalizedGet personalized content recommendations for the user
streamingControl playback via the Web Playback SDK (Premium required)

Alter policy rules can target these attested operations and families for operation-level and parameter-aware controls.

Operation IDFamiliesMethodProvider path
get-current-users-profilereadGET/me
get-a-list-of-current-users-playlistsreadGET/me/playlists
get-playlistreadGET/playlists/{playlist_id}
get-playlists-tracksreadGET/playlists/{playlist_id}/tracks
create-playlistwritePOST/users/{user_id}/playlists
change-playlist-detailswritePUT/playlists/{playlist_id}
add-tracks-to-playlistwritePOST/playlists/{playlist_id}/tracks
remove-tracks-playlistdeleteDELETE/playlists/{playlist_id}/tracks
follow-playlistwritePUT/playlists/{playlist_id}/followers
unfollow-playlistdeleteDELETE/playlists/{playlist_id}/followers
follow-artists-userswritePUT/me/following
unfollow-artists-usersdeleteDELETE/me/following
get-followedreadGET/me/following
save-albums-userwritePUT/me/albums
remove-albums-userdeleteDELETE/me/albums
get-users-saved-albumsreadGET/me/albums
save-tracks-userwritePUT/me/tracks
remove-tracks-userdeleteDELETE/me/tracks
get-users-saved-tracksreadGET/me/tracks
searchreadGET/search
get-trackreadGET/tracks/{id}
get-several-tracksreadGET/tracks
get-recommendationsreadGET/recommendations
get-users-top-artists-and-tracksreadGET/me/top/{type}
get-information-about-the-users-current-playbackreadGET/me/player
transfer-a-users-playbackwritePUT/me/player
start-a-users-playbackwritePUT/me/player/play
pause-a-users-playbackwritePUT/me/player/pause
add-to-queuewritePOST/me/player/queue
get-recently-playedreadGET/me/player/recently-played

These operations are in the provider’s published API specification, but Alter has not reviewed them yet, so their families are unknown. Every operation, family or content rule refuses one with operation_unreviewed unless a rule admits it by name, so a broad rule cannot be dodged by calling one. A rule names one by the provider-qualified name in the first column, never by the bare operation ID, which other providers may share. To use one under a rule, list that name in an operation allowlist to allow it, or in a require_approval rule whose every condition names it to hold it for approval; saving such a rule needs an organization admin. A family never admits one. Because an unreviewed operation may create credentials or change account security, admitting one also needs a scoped credential_minting allowance naming the provider and that name. See Unreviewed operations.

Name in a ruleMethodProvider path
spotify:check-current-user-followsGET/me/following/contains
spotify:check-if-user-follows-playlistGET/playlists/{playlist_id}/followers/contains
spotify:check-users-saved-albumsGET/me/albums/contains
spotify:check-users-saved-audiobooksGET/me/audiobooks/contains
spotify:check-users-saved-episodesGET/me/episodes/contains
spotify:check-users-saved-showsGET/me/shows/contains
spotify:check-users-saved-tracksGET/me/tracks/contains
spotify:get-a-categories-playlistsGET/browse/categories/{category_id}/playlists
spotify:get-a-categoryGET/browse/categories/{category_id}
spotify:get-a-chapterGET/chapters/{id}
spotify:get-a-showGET/shows/{id}
spotify:get-a-shows-episodesGET/shows/{id}/episodes
spotify:get-a-users-available-devicesGET/me/player/devices
spotify:get-an-albumGET/albums/{id}
spotify:get-an-albums-tracksGET/albums/{id}/tracks
spotify:get-an-artistGET/artists/{id}
spotify:get-an-artists-albumsGET/artists/{id}/albums
spotify:get-an-artists-related-artistsGET/artists/{id}/related-artists
spotify:get-an-artists-top-tracksGET/artists/{id}/top-tracks
spotify:get-an-audiobookGET/audiobooks/{id}
spotify:get-an-episodeGET/episodes/{id}
spotify:get-audio-analysisGET/audio-analysis/{id}
spotify:get-audio-featuresGET/audio-features/{id}
spotify:get-audiobook-chaptersGET/audiobooks/{id}/chapters
spotify:get-available-marketsGET/markets
spotify:get-categoriesGET/browse/categories
spotify:get-featured-playlistsGET/browse/featured-playlists
spotify:get-list-users-playlistsGET/users/{user_id}/playlists
spotify:get-multiple-albumsGET/albums
spotify:get-multiple-artistsGET/artists
spotify:get-multiple-audiobooksGET/audiobooks
spotify:get-multiple-episodesGET/episodes
spotify:get-multiple-showsGET/shows
spotify:get-new-releasesGET/browse/new-releases
spotify:get-playlist-coverGET/playlists/{playlist_id}/images
spotify:get-queueGET/me/player/queue
spotify:get-recommendation-genresGET/recommendations/available-genre-seeds
spotify:get-several-audio-featuresGET/audio-features
spotify:get-several-chaptersGET/chapters
spotify:get-the-users-currently-playing-trackGET/me/player/currently-playing
spotify:get-users-profileGET/users/{user_id}
spotify:get-users-saved-audiobooksGET/me/audiobooks
spotify:get-users-saved-episodesGET/me/episodes
spotify:get-users-saved-showsGET/me/shows
spotify:remove-audiobooks-userDELETE/me/audiobooks
spotify:remove-episodes-userDELETE/me/episodes
spotify:remove-shows-userDELETE/me/shows
spotify:reorder-or-replace-playlists-tracksPUT/playlists/{playlist_id}/tracks
spotify:save-audiobooks-userPUT/me/audiobooks
spotify:save-episodes-userPUT/me/episodes
spotify:save-shows-userPUT/me/shows
spotify:seek-to-position-in-currently-playing-trackPUT/me/player/seek
spotify:set-repeat-mode-on-users-playbackPUT/me/player/repeat
spotify:set-volume-for-users-playbackPUT/me/player/volume
spotify:skip-users-playback-to-next-trackPOST/me/player/next
spotify:skip-users-playback-to-previous-trackPOST/me/player/previous
spotify:toggle-shuffle-for-users-playbackPUT/me/player/shuffle
spotify:upload-custom-playlist-coverPUT/playlists/{playlist_id}/images

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand how our website, product, and documentation are used.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

Advertising

Shares visits and sign-ups with Meta, Reddit, and X so we can measure which of our ads work.

You can change these choices at any time from Cookie settings.