Help Wizard

Step 1


How to see through shortened links

How to see through shortened links

Recently Spotify changed share links from the classic "" to a shortened URL "".

There's no way to see through this link, and you can't use fetch on the URL to see where it redirects to, so users aren't able to paste in links to our service, and they're not tech-savvy enough to get the originating URL.

My only thinking right now is a headless browser and following that way, but that's a HUGE implementation.


On mobile especially, there's no way to get a tracks/albums/users ID, just this new shortened share URL which breaks everything.


Any ideas here?

4 Replies

No ideas. Also just noticed it. But I wouldn't hope that anything would change.

The "is_playable" parameter in the Get Track request has not been returned correctly for 4 weeks. No one is going to fix it.

And a short link, I believe, is forever. Because no one reads the forum from those who could fix it.
And a couple of weeks ago everything was correct.

The only way I've gotten around this is doing a GET on the opaque link so I can read the HTML. This may not work for everyone since I tested this on my computer which has the desktop app installed, but my HTML response body includes the following div:

            <div class="sub-heading">
                We have redirected you to the desktop app.
                You can also <a class="secondary-action"
                    this link in your browser.</a>

So I can use my regex parsing on the HTML body to extract the track ID like I have been before. Hope this helps folks. 

This was the solution for me. I used jsdom in Node to parse the response's HTML and grab the link from there. 

Suggested posts