Skip to content

Reference

Spotify

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

Connect your 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 your Spotify Client ID
  • Client Secret: Paste your 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

Report an issue with this page

Necessary

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

Always active

Analytics

Helps us understand which product and documentation features are useful.

Performance diagnostics

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

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