<?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: preview_url is null when calling api from local in Spotify for Developers</title>
    <link>https://community.spotify.com/t5/Spotify-for-Developers/preview-url-is-null-when-calling-api-from-local/m-p/5269816#M3327</link>
    <description>&lt;P&gt;You’ll find this with many of your track requests. &amp;nbsp;It doesn’t always return a preview URL. &amp;nbsp; Even though when you access that track in the app or the web it works.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i have developed a work around to fetch any missing previewURLs from a trackURI&lt;/P&gt;</description>
    <pubDate>Sat, 02 Oct 2021 09:30:38 GMT</pubDate>
    <dc:creator>djk-tel</dc:creator>
    <dc:date>2021-10-02T09:30:38Z</dc:date>
    <item>
      <title>preview_url is null when calling api from local</title>
      <link>https://community.spotify.com/t5/Spotify-for-Developers/preview-url-is-null-when-calling-api-from-local/m-p/5255250#M3163</link>
      <description>&lt;P&gt;Country : JP&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My Question or Issue&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I call the "Get a track" API from the Spotify Console (&lt;A href="https://developer.spotify.com/console/get-track/" target="_blank" rel="noopener"&gt;https://developer.spotify.com/console/get-track/&lt;/A&gt;), it returns a preview_url correctly.&lt;BR /&gt;However, when I copy the curl command shown in the Spotify Console and run it in the terminal on my PC, the preview_url is null for some songs.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example curl command is&amp;nbsp;&lt;BR /&gt;```&lt;BR /&gt;curl -X "GET" "&lt;A href="https://api.spotify.com/v1/tracks/44Ljlpy44mHvLJxcYUvTK0?market=JP" target="_blank" rel="noopener"&gt;https://api.spotify.com/v1/tracks/44Ljlpy44mHvLJxcYUvTK0?market=JP&lt;/A&gt;" -H "Accept: application/json" -H "Content-Type: application/json" -H "Authorization: Bearer XXX"&lt;BR /&gt;```&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The token I used in the above curl request is the token I got from our service using User Authorization.&lt;BR /&gt;When we used the token we got from "OAuth Token &amp;gt; GET TOKEN" in the Spotify Console, we were able to get the preview_url correctly with the curl command.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Are there any restrictions based on the access&amp;nbsp; region, or are there access restrictions for each token?&lt;BR /&gt;I would like to know the cause of not being able to get the preview_url.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 02 Sep 2021 07:05:18 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Spotify-for-Developers/preview-url-is-null-when-calling-api-from-local/m-p/5255250#M3163</guid>
      <dc:creator>tanimuuuu</dc:creator>
      <dc:date>2021-09-02T07:05:18Z</dc:date>
    </item>
    <item>
      <title>Re: preview_url is null when calling api from local</title>
      <link>https://community.spotify.com/t5/Spotify-for-Developers/preview-url-is-null-when-calling-api-from-local/m-p/5269816#M3327</link>
      <description>&lt;P&gt;You’ll find this with many of your track requests. &amp;nbsp;It doesn’t always return a preview URL. &amp;nbsp; Even though when you access that track in the app or the web it works.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i have developed a work around to fetch any missing previewURLs from a trackURI&lt;/P&gt;</description>
      <pubDate>Sat, 02 Oct 2021 09:30:38 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Spotify-for-Developers/preview-url-is-null-when-calling-api-from-local/m-p/5269816#M3327</guid>
      <dc:creator>djk-tel</dc:creator>
      <dc:date>2021-10-02T09:30:38Z</dc:date>
    </item>
    <item>
      <title>Re: preview_url is null when calling api from local</title>
      <link>https://community.spotify.com/t5/Spotify-for-Developers/preview-url-is-null-when-calling-api-from-local/m-p/5460670#M7104</link>
      <description>&lt;P&gt;@djk-tel may I ask you what the work around is? I also noticed this behavior and would need to fetch the preview_url from the spotify player in the case it is `null` in the API response.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Nov 2022 13:22:03 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Spotify-for-Developers/preview-url-is-null-when-calling-api-from-local/m-p/5460670#M7104</guid>
      <dc:creator>Relisora</dc:creator>
      <dc:date>2022-11-21T13:22:03Z</dc:date>
    </item>
    <item>
      <title>Re: preview_url is null when calling api from local</title>
      <link>https://community.spotify.com/t5/Spotify-for-Developers/preview-url-is-null-when-calling-api-from-local/m-p/5656663#M11220</link>
      <description>&lt;P&gt;Can you share your workaround? Facing the same issue&lt;/P&gt;</description>
      <pubDate>Tue, 24 Oct 2023 10:03:18 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Spotify-for-Developers/preview-url-is-null-when-calling-api-from-local/m-p/5656663#M11220</guid>
      <dc:creator>rnnyrrk</dc:creator>
      <dc:date>2023-10-24T10:03:18Z</dc:date>
    </item>
  </channel>
</rss>

