<?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 Spotify Authorization Problems in Spotify for Developers</title>
    <link>https://community.spotify.com/t5/Spotify-for-Developers/Spotify-Authorization-Problems/m-p/5227521#M2784</link>
    <description>&lt;P&gt;&lt;STRONG&gt;Plan&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Free&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Country&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;United States&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Device&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;(Desktop)&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Operating System&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;(Windows 10)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;My Question or Issue&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Hello, I'm currently making an app on Desktop (no backend) with React where a user can see their top songs and artists. I'm using the Implicit Grant Flow Authorization model it's not working. I currently have a button that would redirect the user to the Spotify Account page where it would ask them to give my app permission to look at their data but I'm getting:&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Access to XMLHttpRequest at '&lt;A href="https://accounts.spotify.com/authorize?client_id=undefined&amp;amp;redirect_uri=http://localhost:3000/callback/&amp;amp;response_type=token" target="_blank" rel="noopener"&gt;https://accounts.spotify.com/authorize?client_id=undefined&amp;amp;redirect_uri=http://localhost:3000/callback/&amp;amp;response_type=token&lt;/A&gt;' from origin '&lt;A href="http://localhost:3000" target="_blank" rel="noopener"&gt;http://localhost:3000&lt;/A&gt;' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.&lt;BR /&gt;&lt;BR /&gt;I looked online for solutions but none seem to work. I tried the anchor tag trick where you make the href the URL but I'm greeted with an invalid client error. The Cors trick would not work because I'm not using a backend. Any help would be greatly appreciated, attached is a picture with my current code (They don't allow other files). Thank you!&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;-Slaeh&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 25 Jun 2021 22:53:37 GMT</pubDate>
    <dc:creator>Slaeh</dc:creator>
    <dc:date>2021-06-25T22:53:37Z</dc:date>
    <item>
      <title>Spotify Authorization Problems</title>
      <link>https://community.spotify.com/t5/Spotify-for-Developers/Spotify-Authorization-Problems/m-p/5227521#M2784</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Plan&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Free&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Country&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;United States&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Device&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;(Desktop)&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Operating System&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;(Windows 10)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;My Question or Issue&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Hello, I'm currently making an app on Desktop (no backend) with React where a user can see their top songs and artists. I'm using the Implicit Grant Flow Authorization model it's not working. I currently have a button that would redirect the user to the Spotify Account page where it would ask them to give my app permission to look at their data but I'm getting:&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Access to XMLHttpRequest at '&lt;A href="https://accounts.spotify.com/authorize?client_id=undefined&amp;amp;redirect_uri=http://localhost:3000/callback/&amp;amp;response_type=token" target="_blank" rel="noopener"&gt;https://accounts.spotify.com/authorize?client_id=undefined&amp;amp;redirect_uri=http://localhost:3000/callback/&amp;amp;response_type=token&lt;/A&gt;' from origin '&lt;A href="http://localhost:3000" target="_blank" rel="noopener"&gt;http://localhost:3000&lt;/A&gt;' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.&lt;BR /&gt;&lt;BR /&gt;I looked online for solutions but none seem to work. I tried the anchor tag trick where you make the href the URL but I'm greeted with an invalid client error. The Cors trick would not work because I'm not using a backend. Any help would be greatly appreciated, attached is a picture with my current code (They don't allow other files). Thank you!&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;-Slaeh&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Jun 2021 22:53:37 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Spotify-for-Developers/Spotify-Authorization-Problems/m-p/5227521#M2784</guid>
      <dc:creator>Slaeh</dc:creator>
      <dc:date>2021-06-25T22:53:37Z</dc:date>
    </item>
    <item>
      <title>Re: Spotify Authorization Problems</title>
      <link>https://community.spotify.com/t5/Spotify-for-Developers/Spotify-Authorization-Problems/m-p/5228911#M2792</link>
      <description>&lt;P&gt;Have you tried setting the "&lt;SPAN&gt;Access-Control-Allow-Origin" header that the error message mentions?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Jun 2021 23:41:06 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Spotify-for-Developers/Spotify-Authorization-Problems/m-p/5228911#M2792</guid>
      <dc:creator>Peter_Schorn</dc:creator>
      <dc:date>2021-06-29T23:41:06Z</dc:date>
    </item>
    <item>
      <title>Re: Spotify Authorization Problems</title>
      <link>https://community.spotify.com/t5/Spotify-for-Developers/Spotify-Authorization-Problems/m-p/5228938#M2798</link>
      <description>&lt;P&gt;Hi Peter,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Thanks for responding. I actually solved the issue I was having. It turns out my client ID was undefined. I needed to add REACT_APP in front of my credentials in my dot env file and it worked with the anchor tags around the button component. Thanks for the reply once again.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Cheers,&amp;nbsp;&lt;BR /&gt;Slaeh&lt;/P&gt;</description>
      <pubDate>Wed, 30 Jun 2021 03:21:18 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Spotify-for-Developers/Spotify-Authorization-Problems/m-p/5228938#M2798</guid>
      <dc:creator>Slaeh</dc:creator>
      <dc:date>2021-06-30T03:21:18Z</dc:date>
    </item>
  </channel>
</rss>

