<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Give us an endpoint to decode new shortened share links in Spotify for Developers</title>
    <link>https://community.spotify.com/t5/Spotify-for-Developers/Give-us-an-endpoint-to-decode-new-shortened-share-links/m-p/6529929#M15584</link>
    <description>&lt;P&gt;Hi Inzanity,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;You can try this method: &lt;A title="URL Expander" href="https://www.linksgpt.com/url-expander" target="_blank" rel="noopener"&gt;URL Expander&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;You can also try open-source solutions, search for "url expander" on GitHub to find suitable libraries or code corresponding to your programming language, and integrate them into your software or app.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 23 Nov 2024 07:49:41 GMT</pubDate>
    <dc:creator>jerrytan</dc:creator>
    <dc:date>2024-11-23T07:49:41Z</dc:date>
    <item>
      <title>Give us an endpoint to decode new shortened share links</title>
      <link>https://community.spotify.com/t5/Spotify-for-Developers/Give-us-an-endpoint-to-decode-new-shortened-share-links/m-p/5523686#M8419</link>
      <description>&lt;P&gt;On mobile share-links are now shortened.&lt;/P&gt;&lt;P&gt;For example: &lt;A href="https://spotify.link/hRkBrwub9xb" target="_blank" rel="noopener"&gt;https://spotify.link/hRkBrwub9xb&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;As a developer who relied on the URL containing the trackID this makes it impossible for me to find which track is being passed on. The website redirects to the correct song but it's not using 301 or 302 redirects which means that it probably is a client side JS redirect.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Giving us an endpoint to paste the short url and retrieve the long url would be nice.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Redirect Chain&lt;/STRONG&gt;&lt;/P&gt;&lt;UL class=""&gt;&lt;LI&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="#" target="_blank" rel="noopener"&gt;https://spotify.link/hRkBrwub9xb&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":down_right_arrow:"&gt;↘️&lt;/span&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="#" target="_blank" rel="noopener"&gt;https://spotify.app.link/hRkBrwub9xb?_p=c81429c09d077af7fc1c8ef9&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":down_right_arrow:"&gt;↘️&lt;/span&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;&amp;nbsp;&lt;A href="#" target="_blank" rel="noopener"&gt;https://open.spotify.com/track/7xtG2Kac0KPcd1ThPEGbZw?si=kSFehapCSom4SdMftCB7Dw&amp;amp;utm_source=copy-link&amp;amp;utm_medium=copy-link&amp;amp;nd=1&lt;/A&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;To further clearify that the short links are not a good idea is that embeds in popular chat programs like Discord won't work anymore. Even Spotify's own oEmbed endpoint does not work with this kind of URL:&amp;nbsp;&lt;A href="https://open.spotify.com/oembed?url=https://spotify.link/SIT53edKeyb" target="_blank" rel="noopener"&gt;https://open.spotify.com/oembed?url=https://spotify.link/&lt;/A&gt;&lt;A href="https://spotify.link/hRkBrwub9xb" target="_blank" rel="noopener"&gt;hRkBrwub9xb&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;"error": {
    "code": 404,
    "message": "Invalid URI: error in parsing"
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 19 Mar 2023 19:15:29 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Spotify-for-Developers/Give-us-an-endpoint-to-decode-new-shortened-share-links/m-p/5523686#M8419</guid>
      <dc:creator>Inzanity</dc:creator>
      <dc:date>2023-03-19T19:15:29Z</dc:date>
    </item>
    <item>
      <title>Re: Give us an endpoint to decode new shortened share links</title>
      <link>https://community.spotify.com/t5/Spotify-for-Developers/Give-us-an-endpoint-to-decode-new-shortened-share-links/m-p/5637302#M10762</link>
      <description>&lt;P&gt;I just ran into this issue myself, you don't actually need a dedicated endpoint for it because it's just a redirect. Just send a HEAD request to the URL and follow the redirects. Here's how you can unfurl it in Python.&lt;/P&gt;&lt;LI-CODE lang="python"&gt;import requests
r = requests.head("&amp;lt;spotify.link url&amp;gt;", allow_redirects=True)
print(r.url)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp; And similarly in cURL.&lt;/P&gt;&lt;PRE&gt;curl -vILsw %{url_effective} https://spotify.link/hRkBrwub9xb&lt;/PRE&gt;</description>
      <pubDate>Sun, 17 Sep 2023 03:43:16 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Spotify-for-Developers/Give-us-an-endpoint-to-decode-new-shortened-share-links/m-p/5637302#M10762</guid>
      <dc:creator>estheruary</dc:creator>
      <dc:date>2023-09-17T03:43:16Z</dc:date>
    </item>
    <item>
      <title>Re: Give us an endpoint to decode new shortened share links</title>
      <link>https://community.spotify.com/t5/Spotify-for-Developers/Give-us-an-endpoint-to-decode-new-shortened-share-links/m-p/5638017#M10777</link>
      <description>&lt;P&gt;Even though it gives the response code for forbidden it returns the full URL. This is, albeit not ideal, the solution.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 18 Sep 2023 17:40:02 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Spotify-for-Developers/Give-us-an-endpoint-to-decode-new-shortened-share-links/m-p/5638017#M10777</guid>
      <dc:creator>Inzanity</dc:creator>
      <dc:date>2023-09-18T17:40:02Z</dc:date>
    </item>
    <item>
      <title>Re: Give us an endpoint to decode new shortened share links</title>
      <link>https://community.spotify.com/t5/Spotify-for-Developers/Give-us-an-endpoint-to-decode-new-shortened-share-links/m-p/5646812#M10985</link>
      <description>&lt;P&gt;This is still impossible in some popular programming languages, Dart for example. Without the 3xx redirect code Dart cannot properly expand the URL all the way. A Spotify endpoint that gives you the full URL would be very helpful.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Oct 2023 17:34:26 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Spotify-for-Developers/Give-us-an-endpoint-to-decode-new-shortened-share-links/m-p/5646812#M10985</guid>
      <dc:creator>sometimeshenry</dc:creator>
      <dc:date>2023-10-04T17:34:26Z</dc:date>
    </item>
    <item>
      <title>Re: Give us an endpoint to decode new shortened share links</title>
      <link>https://community.spotify.com/t5/Spotify-for-Developers/Give-us-an-endpoint-to-decode-new-shortened-share-links/m-p/5649922#M11043</link>
      <description>&lt;P&gt;The "allow_redirects" param is not helpful as I'm redirected to this page:&amp;nbsp;&lt;A href="https://www.spotify.com/us/download/pc?_branch_match_id=1240295733527340369&amp;amp;utm_source=copy-link&amp;amp;utm_medium=sharing&amp;amp;_branch_referrer=H4sIAAAAAAAAA8soKSkottLXLy7IL8lMq9TLyczL1s8p8c%2FIDq%2BK8HZJAgBxnj5cIAAAAA%3D%3D" target="_blank"&gt;https://www.spotify.com/us/download/pc?_branch_match_id=1240295733527340369&amp;amp;utm_source=copy-link&amp;amp;utm_medium=sharing&amp;amp;_branch_referrer=H4sIAAAAAAAAA8soKSkottLXLy7IL8lMq9TLyczL1s8p8c%2FIDq%2BK8HZJAgBxnj5cIAAAAA%3D%3D&lt;/A&gt;&amp;nbsp;which is not the playlist linked by the Spotify link:&amp;nbsp;&lt;A href="https://spotify.link/ltOhkWzXKDb" target="_self"&gt;https://spotify.link/ltOhkWzXKDb&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Oct 2023 14:24:10 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Spotify-for-Developers/Give-us-an-endpoint-to-decode-new-shortened-share-links/m-p/5649922#M11043</guid>
      <dc:creator>blackarcanis</dc:creator>
      <dc:date>2023-10-10T14:24:10Z</dc:date>
    </item>
    <item>
      <title>Re: Give us an endpoint to decode new shortened share links</title>
      <link>https://community.spotify.com/t5/Spotify-for-Developers/Give-us-an-endpoint-to-decode-new-shortened-share-links/m-p/5650095#M11046</link>
      <description>&lt;P&gt;This is because Spotify does the redirect through js - specifically&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;window.top.location.replace(FINAL_DESTINATION)&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 10 Oct 2023 18:34:42 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Spotify-for-Developers/Give-us-an-endpoint-to-decode-new-shortened-share-links/m-p/5650095#M11046</guid>
      <dc:creator>sometimeshenry</dc:creator>
      <dc:date>2023-10-10T18:34:42Z</dc:date>
    </item>
    <item>
      <title>Re: Give us an endpoint to decode new shortened share links</title>
      <link>https://community.spotify.com/t5/Spotify-for-Developers/Give-us-an-endpoint-to-decode-new-shortened-share-links/m-p/5650404#M11057</link>
      <description>&lt;P&gt;Ok; so how can I handle that correctly using CURL in PHP to have the correct destination URL?&lt;/P&gt;&lt;P&gt;EDIT: good by parsing the HTML. Still need a proper API endpoint for that.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Oct 2023 12:03:50 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Spotify-for-Developers/Give-us-an-endpoint-to-decode-new-shortened-share-links/m-p/5650404#M11057</guid>
      <dc:creator>blackarcanis</dc:creator>
      <dc:date>2023-10-11T12:03:50Z</dc:date>
    </item>
    <item>
      <title>Re: Give us an endpoint to decode new shortened share links</title>
      <link>https://community.spotify.com/t5/Spotify-for-Developers/Give-us-an-endpoint-to-decode-new-shortened-share-links/m-p/5650608#M11064</link>
      <description>&lt;P&gt;You can use the cURL command or python snippet to get the final destination. Here is a Replit using the python snippet:&amp;nbsp;&lt;A href="https://replit.com/@HenryHill4/spotify-short-link-redirect-example?v=1" target="_blank"&gt;https://replit.com/@HenryHill4/spotify-short-link-redirect-example?v=1&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Oct 2023 18:17:30 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Spotify-for-Developers/Give-us-an-endpoint-to-decode-new-shortened-share-links/m-p/5650608#M11064</guid>
      <dc:creator>sometimeshenry</dc:creator>
      <dc:date>2023-10-11T18:17:30Z</dc:date>
    </item>
    <item>
      <title>Re: Give us an endpoint to decode new shortened share links</title>
      <link>https://community.spotify.com/t5/Spotify-for-Developers/Give-us-an-endpoint-to-decode-new-shortened-share-links/m-p/5926812#M13031</link>
      <description>&lt;P&gt;This is still broken in 2024&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Mar 2024 10:45:50 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Spotify-for-Developers/Give-us-an-endpoint-to-decode-new-shortened-share-links/m-p/5926812#M13031</guid>
      <dc:creator>callumnsmith</dc:creator>
      <dc:date>2024-03-06T10:45:50Z</dc:date>
    </item>
    <item>
      <title>Re: Give us an endpoint to decode new shortened share links</title>
      <link>https://community.spotify.com/t5/Spotify-for-Developers/Give-us-an-endpoint-to-decode-new-shortened-share-links/m-p/5927525#M13041</link>
      <description>&lt;P&gt;Set your user agent to curl! Example in Dart:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Future&lt;/SPAN&gt;&lt;SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN&gt;String&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt; &lt;/SPAN&gt;&lt;SPAN&gt;getShortLinkID&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;String&lt;/SPAN&gt;&lt;SPAN&gt; url) &lt;/SPAN&gt;&lt;SPAN&gt;async&lt;/SPAN&gt;&lt;SPAN&gt; {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Dio&lt;/SPAN&gt;&lt;SPAN&gt; dio &lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;Dio&lt;/SPAN&gt;&lt;SPAN&gt;();&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;dio.options.followRedirects &lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;true&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;dio.options.maxRedirects &lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;10&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Response&lt;/SPAN&gt;&lt;SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN&gt;void&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt; response &lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;await&lt;/SPAN&gt;&lt;SPAN&gt; dio.&lt;/SPAN&gt;&lt;SPAN&gt;head&lt;/SPAN&gt;&lt;SPAN&gt;(url,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;options&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;Options&lt;/SPAN&gt;&lt;SPAN&gt;(headers&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;SPAN&gt; {&lt;/SPAN&gt;&lt;SPAN&gt;"User-Agent"&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;"curl/7.79.1"&lt;/SPAN&gt;&lt;SPAN&gt;}));&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;if&lt;/SPAN&gt;&lt;SPAN&gt; (response.statusCode &lt;/SPAN&gt;&lt;SPAN&gt;==&lt;/SPAN&gt; &lt;SPAN&gt;200&lt;/SPAN&gt;&lt;SPAN&gt;) {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;return&lt;/SPAN&gt;&lt;SPAN&gt; response.realUri.&lt;/SPAN&gt;&lt;SPAN&gt;toString&lt;/SPAN&gt;&lt;SPAN&gt;();&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;} &lt;/SPAN&gt;&lt;SPAN&gt;else&lt;/SPAN&gt;&lt;SPAN&gt; {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;throw&lt;/SPAN&gt; &lt;SPAN&gt;Exception&lt;/SPAN&gt;&lt;SPAN&gt;();&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;It will give you the real URL.&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 06 Mar 2024 18:29:57 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Spotify-for-Developers/Give-us-an-endpoint-to-decode-new-shortened-share-links/m-p/5927525#M13041</guid>
      <dc:creator>sometimeshenry</dc:creator>
      <dc:date>2024-03-06T18:29:57Z</dc:date>
    </item>
    <item>
      <title>Re: Give us an endpoint to decode new shortened share links</title>
      <link>https://community.spotify.com/t5/Spotify-for-Developers/Give-us-an-endpoint-to-decode-new-shortened-share-links/m-p/6296600#M14882</link>
      <description>&lt;P&gt;&lt;A href="https://open.spotify.com/track/0ROj512WvJ1eqeELd7MEdJ?si=lvzLmoJcREmKzevPHekKOQ&amp;amp;context=spotify%3Aalbum%3A1e1NmOduCFHp1z29cSzyMa" target="_blank"&gt;https://open.spotify.com/track/0ROj512WvJ1eqeELd7MEdJ?si=lvzLmoJcREmKzevPHekKOQ&amp;amp;context=spotify%3Aalbum%3A1e1NmOduCFHp1z29cSzyMa&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Aug 2024 06:23:36 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Spotify-for-Developers/Give-us-an-endpoint-to-decode-new-shortened-share-links/m-p/6296600#M14882</guid>
      <dc:creator>tatatat</dc:creator>
      <dc:date>2024-08-28T06:23:36Z</dc:date>
    </item>
    <item>
      <title>Re: Give us an endpoint to decode new shortened share links</title>
      <link>https://community.spotify.com/t5/Spotify-for-Developers/Give-us-an-endpoint-to-decode-new-shortened-share-links/m-p/6529929#M15584</link>
      <description>&lt;P&gt;Hi Inzanity,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;You can try this method: &lt;A title="URL Expander" href="https://www.linksgpt.com/url-expander" target="_blank" rel="noopener"&gt;URL Expander&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;You can also try open-source solutions, search for "url expander" on GitHub to find suitable libraries or code corresponding to your programming language, and integrate them into your software or app.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 23 Nov 2024 07:49:41 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Spotify-for-Developers/Give-us-an-endpoint-to-decode-new-shortened-share-links/m-p/6529929#M15584</guid>
      <dc:creator>jerrytan</dc:creator>
      <dc:date>2024-11-23T07:49:41Z</dc:date>
    </item>
  </channel>
</rss>

