TooTallNate / spotify-uri

Parse and format the various Spotify URI formats
MIT License
70 stars 16 forks source link

spotify.link support #34

Open syntichsizer opened 1 year ago

syntichsizer commented 1 year ago

It seems that Spotify now uses spotify.link urls by default when sharing from mobile applications. Is it planned to support these shortened links? Thanks!

syntichsizer commented 1 year ago

For anyone having similar problems, this is a temporary solution I'm using:

fetch("https://spotify.link/74vFi7E2yDb")
.then(r => {
    if (!r.ok) {
        throw new Error(`HTTP error ${r.status}`);
    }
    for (const [key, value] of r.headers) {
        console.log(`${key}: ${value}`);
    }
    console.log(r.url);
})
.catch(console.error);

(https://stackoverflow.com/questions/72053979/how-to-find-out-where-the-short-urls-point-to-with-javascript)