Custom Spotify Buttons


AE has built-in Spotify buttons that perform an extra action when your member registers through Spotify. Each button is a link with the data-ae-follow-link="spotify" attribute.


For pre-save campaigns that deliver an album or track once it is released, see Create a Spotify or YouTube Music Pre-save Campaign.


Jump to: Add album to library, Add track to library, Follow artist and Follow playlist.


Before you add a button, set up AEJS on your website. See AE Connect - Basic Install. You can style each button like any other AE Connect link; see styling AE Connect.



Add Album to Library


This creates an "Add album to library" button on your site. It works like a regular Spotify AE Connect registration, and it also adds the specified album to the member's library immediately after registration. Add this code to your HTML:


<a href="#" data-ae-follow-link="spotify" data-ae-album-id="ALBUMID">Add album to library</a>


The HTML accepts album IDs (from the album URL) and IDs in the Spotify URI format. For example: 0BwWUstDMUbgq2NYONRqlu and spotify:album:0BwWUstDMUbgq2NYONRqlu.


Important

If the wrong attribute is used, AE goes by the type of the Spotify URI. For example, spotify:track:0ofHAoxe9vBkTCp2UQIavz in an album attribute is treated as a track.


Then add the Spotify permission the button needs:

  1. In the AE dashboard, open AE Connect from the Settings menu (the gear) and choose your application.
  2. Under Social Apps > Streaming, click the Spotify icon and select Advanced settings.
  3. Check that user-library-modify is listed under Current permissions. New Spotify apps include it by default. If it is missing, enter it in Add Additional Permissions, click Add, then click Update app.



Add Track to Library


This creates an "Add track to library" button that registers the member and adds the specified track to their library. Add this code to your HTML:


<a href="#" data-ae-follow-link="spotify" data-ae-track-id="TRACKID">Add track to library</a>


The HTML accepts track IDs (from the track URL) and IDs in the Spotify URI format. For example: 0ofHAoxe9vBkTCp2UQIavz and spotify:track:0ofHAoxe9vBkTCp2UQIavz.


Important

If the wrong attribute is used, AE goes by the type of the Spotify URI. For example, spotify:track:0ofHAoxe9vBkTCp2UQIavz in an album attribute is treated as a track.


Then add the Spotify permission the button needs:

  1. In the AE dashboard, open AE Connect from the Settings menu (the gear) and choose your application.
  2. Under Social Apps > Streaming, click the Spotify icon and select Advanced settings.
  3. Check that user-library-modify is listed under Current permissions. New Spotify apps include it by default. If it is missing, enter it in Add Additional Permissions, click Add, then click Update app.



Follow Artist


This creates a button that registers the member and makes them follow the specified artist on Spotify. Add this code to your HTML:


<a href="#" data-ae-follow-link="spotify" data-ae-artist-id="08GQAI4eElDnROBrJRGE0X">Spotify Artist follow</a>


The HTML accepts artist IDs (from the artist's URL) and IDs in the Spotify URI format. For example: 08GQAI4eElDnROBrJRGE0X and spotify:artist:08GQAI4eElDnROBrJRGE0X.


Important

If the wrong attribute is used, AE goes by the type of the Spotify URI. For example, spotify:track:0ofHAoxe9vBkTCp2UQIavz in an album attribute is treated as a track.


Then add the Spotify permission the button needs:

  1. In the AE dashboard, open AE Connect from the Settings menu (the gear) and choose your application.
  2. Under Social Apps > Streaming, click the Spotify icon and select Advanced settings.
  3. In Add Additional Permissions, enter user-follow-modify and click Add. The permission appears in Current permissions.
  4. Click Update app.



Follow Playlist


This creates a button that registers the member and makes them follow the specified playlist on Spotify. Add this code to your HTML:


<a href="#" data-ae-follow-link="spotify" data-ae-playlist-id="37i9dQZF1DWXRqgorJj26U">Spotify playlist follow</a>


The HTML accepts playlist IDs (from the playlist URL) and IDs in the Spotify URI format. For example: 37i9dQZF1DWXRqgorJj26U and spotify:playlist:37i9dQZF1DWXRqgorJj26U.


Important

If the wrong attribute is used, AE goes by the type of the Spotify URI. For example, spotify:track:0ofHAoxe9vBkTCp2UQIavz in an album attribute is treated as a track.


Then add the Spotify permission the button needs:

  1. In the AE dashboard, open AE Connect from the Settings menu (the gear) and choose your application.
  2. Under Social Apps > Streaming, click the Spotify icon and select Advanced settings.
  3. In Add Additional Permissions, enter user-follow-modify and click Add. The permission appears in Current permissions.
  4. Click Update app.


Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article