<?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: Web API PKCE Authorize Not Working: INVALID_CLIENT: Invalid redirect URI in Spotify for Developers</title>
    <link>https://community.spotify.com/t5/Spotify-for-Developers/Web-API-PKCE-Authorize-Not-Working-INVALID-CLIENT-Invalid/m-p/6705077#M16912</link>
    <description>&lt;P&gt;Same issue here too with a React Native Project. Without PKCE everything works fine, but if I try the PKCE flow it returns "INVALID_CLIENT: Invalid redirect URI".&lt;/P&gt;</description>
    <pubDate>Mon, 10 Feb 2025 18:14:50 GMT</pubDate>
    <dc:creator>Tanict</dc:creator>
    <dc:date>2025-02-10T18:14:50Z</dc:date>
    <item>
      <title>Web API PKCE Authorize Not Working: INVALID_CLIENT: Invalid redirect URI</title>
      <link>https://community.spotify.com/t5/Spotify-for-Developers/Web-API-PKCE-Authorize-Not-Working-INVALID-CLIENT-Invalid/m-p/5478109#M7431</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Plan&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Premium&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Country&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;USA&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Device&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Pixel 3a Emulator&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Operating System&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Android 13&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;I am developing a mobile app with flutter/dart that uses Spotify's Web API. I am able to authenticate users without PKCE but when I use PKCE I get the error "INVALID_CLIENT: Invalid redirect URI" yet I have not changed the redirect URI and the URI used in the request matches the URI in the settings in my developer portal. Do I need to do anything other than use the parameters code_challenge_method and code_challenege to use PKCE?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is an example of the authorization URl I use:&lt;/P&gt;&lt;P&gt;&lt;A title="Ctrl + click to follow link" target="_blank"&gt;https://accounts.spotify.com/authorize?response_type=code&amp;amp;client_id=[My Client ID]&amp;amp;scope=user-top-read+user-read-recently-played&amp;amp;redirect_uri=com.example.abc-spotify%3A%2F%2F&amp;amp;state=kDHp9NZjWbYD&amp;amp;code_challenge_method=S256&amp;amp;code_challenge=877811825597e44c2a3f38f2ea615370212d32a3837c1e98bec67f1b103be88b&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Query Parameters:&lt;/P&gt;&lt;P&gt;response_type:&amp;nbsp;&lt;A title="Ctrl + click to follow link" target="_blank"&gt;code&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A title="Ctrl + click to follow link" target="_blank"&gt;client_id: [My Client ID]&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A title="Ctrl + click to follow link" target="_blank"&gt;scope: user-top-read+user-read-recently-played&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A title="Ctrl + click to follow link" target="_blank"&gt;redirect_uri: com.example.abc-spotify%3A%2F%2F&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A title="Ctrl + click to follow link" target="_blank"&gt;state: kDHp9NZjWbYD&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A title="Ctrl + click to follow link" target="_blank"&gt;code_challenge_method: S256&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A title="Ctrl + click to follow link" target="_blank"&gt;code_challenge: 877811825597e44c2a3f38f2ea615370212d32a3837c1e98bec67f1b103be88b&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This was the code verifier in this example:&amp;nbsp;&lt;SPAN&gt;ueA7xfrl9hB8Q8jPBzvxHL0ldxzjPN5PWCGnG8pbtw7Gmlin9nyBXw2l4hFc6rDQflcUmAbbe72bURkY5QAfErDsKjDZ1x3P9glG&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Dec 2022 09:06:40 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Spotify-for-Developers/Web-API-PKCE-Authorize-Not-Working-INVALID-CLIENT-Invalid/m-p/5478109#M7431</guid>
      <dc:creator>Aceee3</dc:creator>
      <dc:date>2022-12-23T09:06:40Z</dc:date>
    </item>
    <item>
      <title>Re: Web API PKCE Authorize Not Working: INVALID_CLIENT: Invalid redirect URI</title>
      <link>https://community.spotify.com/t5/Spotify-for-Developers/Web-API-PKCE-Authorize-Not-Working-INVALID-CLIENT-Invalid/m-p/6589493#M16280</link>
      <description>&lt;P&gt;I know this is old, but were you ever able to get it figured out? I am having the same issue with a react native project.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Dec 2024 21:36:34 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Spotify-for-Developers/Web-API-PKCE-Authorize-Not-Working-INVALID-CLIENT-Invalid/m-p/6589493#M16280</guid>
      <dc:creator>TimothyLuedtke</dc:creator>
      <dc:date>2024-12-16T21:36:34Z</dc:date>
    </item>
    <item>
      <title>Re: Web API PKCE Authorize Not Working: INVALID_CLIENT: Invalid redirect URI</title>
      <link>https://community.spotify.com/t5/Spotify-for-Developers/Web-API-PKCE-Authorize-Not-Working-INVALID-CLIENT-Invalid/m-p/6705077#M16912</link>
      <description>&lt;P&gt;Same issue here too with a React Native Project. Without PKCE everything works fine, but if I try the PKCE flow it returns "INVALID_CLIENT: Invalid redirect URI".&lt;/P&gt;</description>
      <pubDate>Mon, 10 Feb 2025 18:14:50 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Spotify-for-Developers/Web-API-PKCE-Authorize-Not-Working-INVALID-CLIENT-Invalid/m-p/6705077#M16912</guid>
      <dc:creator>Tanict</dc:creator>
      <dc:date>2025-02-10T18:14:50Z</dc:date>
    </item>
  </channel>
</rss>

