Embed Spotify Audio Files with OSEmbed

Get the Spotify song URL

  • Visit Spotify.com and find the song you want to embed.
  • Click on the menu for the song and click "Copy Spotify URL".
Get the Spotify song URL

When you copy a Spotify URL, they are going to look like this:

  • https://play.spotify.com/track/02QQXgeAghpU4smdM7l7We
  • https://play.spotify.com/track/0o6IWuQ9Uxt69jKdVZ1eg2
  • https://play.spotify.com/track/4npJaHkcdqXaPw2J2eSUya

In order to make the embed work, you need to change "play" to "open" in the URL. For example, change the URLs above to these:

  • https://open.spotify.com/track/02QQXgeAghpU4smdM7l7We
  • https://open.spotify.com/track/0o6IWuQ9Uxt69jKdVZ1eg2
  • https://open.spotify.com/track/4npJaHkcdqXaPw2J2eSUya

Why do we need to change the link? It's Spotify's fault. Until recently, all Spotify links used open.spotify.com. However they updated their URLs and didn't update some of their external integrations to reflect this change.

Add the Spotify URL to a Joomla article

  • Go to your Joomla site and login.
  • Add the updated Spotify URL to a Joomla article:
Adding a Spotify song to Joomla

That embed will work perfectly on the front of your site:

A Spotify song embed showing in Joomla