Type in your question below and we'll check to see what answers we can find...
Loading article...
Submitting...
If you couldn't find any answers in the previous step then we need to post your question in the community and wait for someone to respond. You'll be notified when that happens.
Simply add some detail to your question and refine the title if needed, choose the relevant category, then post.
Before we can post your question we need you to quickly make an account (or sign in if you already have one).
Don't worry - it's quick and painless! Just click below, and once you're logged in we'll bring you right back here and post your question. We'll remember what you've already typed in so you won't have to do it again.
Recently Spotify changed share links from the classic "https://open.spotify.com/track..album..user..etc/id" to a shortened URL "https://spotify.link/randomString".
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?
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.
</br>
You can also <a class="secondary-action"
href="https://open.spotify.com/track/0RM0BeXRRIz1LExEl83GhA?si=FCAOOxnhTueTrAbOwn3x0w&utm_source=copy-link&utm_medium=copy-link&nd=1&_branch_match_id=1236116524762470129&_branch_referrer=H4sIAAAAAAAAA8soKSkottLXLy7IL8lMq9TLyczL1rcozDcwTclzLnJJAgBpSYS%2BIAAAAA%3D%3D">open
this link in your browser.</a>
</div>
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.
A solution in Python is in this comment:
This was the solution for me. I used jsdom in Node to parse the response's HTML and grab the link from there.
Hey there you, Yeah, you! 😁 Welcome - we're glad you joined the Spotify Community! While you here, let's have a fun game and get…