Logo

dev-resources.site

for different kinds of informations.

Hide Rick Rolls in a Spotify Link

Published at
5/13/2024
Categories
spotify
rickroll
javascript
bug
Author
wulfmann
Categories
4 categories in total
spotify
open
rickroll
open
javascript
open
bug
open
Author
8 person written this
wulfmann
open
Hide Rick Rolls in a Spotify Link

Last night, my brother messaged me a spotify link, but when I tapped it, it took me somewhere else entirely.

Screenshot of my brother sending me a weird link

tldr; I made a thing to hide rick rolls in spotify links: https://spotify-rickroll.vercel.app/

After copying the link to a note to see the raw URL, I saw that there was a query string with URL encoded values.



https://open.spotify.com/track/66cuLvkHsW7dNkfNk6gQP9?context=spotify%3Aalbum%3A6DUyohk95eun9LArJtHyF7


Enter fullscreen mode Exit fullscreen mode

The API reference is light on details, but spotify mobile apps appear to resolve whatever spotify URI is passed in the context parameter (the web UI did not behave this way).

After inspecting the URL I realized that the first ID in the URL (66cuLvkHsW7dNkfNk6gQP9) matched A Wolf At the Door by Radiohead and the second ID in the query string (6DUyohk95eun9LArJtHyF7) indeed matched the album Country by Medium Build (a fantastic album you should check out).

After creating some more examples (linking to a search, a podcast, etc.), I discovered that using: spotify:track:<track id> will cause the track to automatically play. The value of this was quickly realized with a certain (infamous) spotify ID 4PTG3Z6ehGkBFwjybzWkR8 (copy paste into a message to try it out):



https://open.spotify.com/track/7pqmuOzAXmnuAXP68LSjD5?context=spotify%3Atrack%3A4PTG3Z6ehGkBFwjybzWkR8


Enter fullscreen mode Exit fullscreen mode

Screenshot of a conversation where my sister got got

After crafting a few more by hand, I threw together a simple website to handle parsing the track IDs and generating a rick roll (or optionally a different target track entirely).

After spending the morning rick rolling everyone I can think of, I have made it public (github):

You can generate your own links here:

https://spotify-rickroll.vercel.app/

Misc. observations:

  • This appears to only work on mobile apps (tested on ios and android)
  • iOS provides the most impact because it automatically renders the preview track whereas Android requires you to tap to display the preview
  • How the spotify app generated one of these links in the first place does appear to be a somewhat difficult to reproduce bug. If anyone from the spotify team would like to get any of the original links with the si values please reach out.

Rick Astley in all his glory

Enjoy 鉂わ笍

spotify Article's
30 articles in total
Favicon
Essential Features of a Music Streaming App Like Spotify
Favicon
Troubleshooting Spotify Proxy Errors
Favicon
How to Solve Spotify Proxy Problems
Favicon
This is all about Instafest
Favicon
How spoken.host Simplifies Spotify API Authentication
Favicon
Automating Spotify Playlist Creation with Terraform: My Journey to "Perfect"
Favicon
What Is a Proxy Service for Spotify and How to Set It Up
Favicon
Advice from Software Engineers at Google and Spotify
Favicon
UI/Text Blur Issues with Electron-Based Applications (e.g., Spotify, Discord) on Wayland
Favicon
OAuth Tutorial with Go and the Spotify API
Favicon
Create Custom Spotify Playlist Covers: A Developer's Journey
Favicon
Design Spotify
Favicon
Spotify Premium APK v8.10.9.722 Descargar Ultima Versi贸n 2024
Favicon
馃殌 Introducing SpotAPI: A Python Library for Effortless Spotify Integration 馃殌
Favicon
Spotify Premium APK Descargar 煤ltima versi贸n para Android 2024
Favicon
Playlists created and managed seamlessly with Terraform!
Favicon
Spotify Premium APK Descargar 脷ltima versi贸n para Android 2024
Favicon
Adding Spotify Now Playing to Your React App
Favicon
Unlock the Full Potential of Spotify with Spotify Premium APK
Favicon
CREATE SPOTIFY PLAYLIST USING TERRAFORM
Favicon
Bundling Code-Bases with Large File Structures
Favicon
Clonador y Fusionador de Playlists para Spotify
Favicon
Spotify MOD APK v8.9.6.458: Download (No Ads/Premium) 2024
Favicon
Hide Rick Rolls in a Spotify Link
Favicon
GO Spotify CLI
Favicon
I made a web app that creates Spotify playlists for you
Favicon
驴Escuchar m煤sica en Spotify tiene anuncios?
Favicon
How to get a Spotify Refresh Token
Favicon
A Brief Look At Spotify's Tech Stack
Favicon
How To Create Spotify Stats Charts With Spotify Pie?

Featured ones: