<?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 OAuth Scope Parameter Not Included In Authorisation URL in Spotify for Developers</title>
    <link>https://community.spotify.com/t5/Spotify-for-Developers/Spotify-OAuth-Scope-Parameter-Not-Included-In-Authorisation-URL/m-p/6985102#M17991</link>
    <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;I’m working on integrating Spotify OAuth login into my React app. I want to request multiple scopes including &lt;STRONG&gt;user-read-email&lt;/STRONG&gt;, &lt;STRONG&gt;user-read-private&lt;/STRONG&gt;, and &lt;STRONG&gt;user-follow-read&lt;/STRONG&gt;. However, when I build the authorization URL and redirect the user to Spotify’s login page, the URL only contains the first two scopes (&lt;STRONG&gt;user-read-email&lt;/STRONG&gt; and &lt;STRONG&gt;user-read-private&lt;/STRONG&gt;). The additional scopes I add (like &lt;STRONG&gt;user-follow-read&lt;/STRONG&gt;) never appear in the URL query parameters.&lt;/P&gt;&lt;P&gt;I have tried:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;Hardcoding the scopes string&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Changing the order of scopes&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Logging the constructed URL before redirecting, which still shows missing scopes&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Using URL and URLSearchParams objects to build the URL as well as manually constructing the URL string&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Testing in different browsers and incognito mode&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Verifying the scopes are enabled in my Spotify Developer Dashboard app&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Confirming my redirect URI exactly matches the registered URI in Spotify Dashboard&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Here is a simplified example of the code I’m using to build the URL:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;const CLIENT_ID = '...';
const REDIRECT_URI = 'http://127.0.0.1:8000/callback';
const SCOPE = 'user-read-email user-read-private user-follow-read';
const AUTH_ENDPOINT = 'https://accounts.spotify.com/authorize';

const authUrl = new URL(AUTH_ENDPOINT);
authUrl.searchParams.set('response_type', 'code');
authUrl.searchParams.set('client_id', CLIENT_ID);
authUrl.searchParams.set('scope', SCOPE);
authUrl.searchParams.set('redirect_uri', REDIRECT_URI);
authUrl.searchParams.set('state', crypto.randomUUID());

console.log(authUrl.toString()); // Scopes missing here too

window.location.href = authUrl.toString();
&lt;/LI-CODE&gt;&lt;P&gt;Despite this, the scope parameter in the URL only includes the first two scopes, and the third scope (and any others I add) are missing.&lt;/P&gt;&lt;P&gt;Has anyone else encountered this? What could cause scopes to be omitted from the authorization URL when building it in React? Any tips or ideas to debug this would be appreciated!&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 27 May 2025 15:19:07 GMT</pubDate>
    <dc:creator>Tommyboy0797</dc:creator>
    <dc:date>2025-05-27T15:19:07Z</dc:date>
    <item>
      <title>Spotify OAuth Scope Parameter Not Included In Authorisation URL</title>
      <link>https://community.spotify.com/t5/Spotify-for-Developers/Spotify-OAuth-Scope-Parameter-Not-Included-In-Authorisation-URL/m-p/6985102#M17991</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;I’m working on integrating Spotify OAuth login into my React app. I want to request multiple scopes including &lt;STRONG&gt;user-read-email&lt;/STRONG&gt;, &lt;STRONG&gt;user-read-private&lt;/STRONG&gt;, and &lt;STRONG&gt;user-follow-read&lt;/STRONG&gt;. However, when I build the authorization URL and redirect the user to Spotify’s login page, the URL only contains the first two scopes (&lt;STRONG&gt;user-read-email&lt;/STRONG&gt; and &lt;STRONG&gt;user-read-private&lt;/STRONG&gt;). The additional scopes I add (like &lt;STRONG&gt;user-follow-read&lt;/STRONG&gt;) never appear in the URL query parameters.&lt;/P&gt;&lt;P&gt;I have tried:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;Hardcoding the scopes string&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Changing the order of scopes&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Logging the constructed URL before redirecting, which still shows missing scopes&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Using URL and URLSearchParams objects to build the URL as well as manually constructing the URL string&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Testing in different browsers and incognito mode&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Verifying the scopes are enabled in my Spotify Developer Dashboard app&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Confirming my redirect URI exactly matches the registered URI in Spotify Dashboard&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Here is a simplified example of the code I’m using to build the URL:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;const CLIENT_ID = '...';
const REDIRECT_URI = 'http://127.0.0.1:8000/callback';
const SCOPE = 'user-read-email user-read-private user-follow-read';
const AUTH_ENDPOINT = 'https://accounts.spotify.com/authorize';

const authUrl = new URL(AUTH_ENDPOINT);
authUrl.searchParams.set('response_type', 'code');
authUrl.searchParams.set('client_id', CLIENT_ID);
authUrl.searchParams.set('scope', SCOPE);
authUrl.searchParams.set('redirect_uri', REDIRECT_URI);
authUrl.searchParams.set('state', crypto.randomUUID());

console.log(authUrl.toString()); // Scopes missing here too

window.location.href = authUrl.toString();
&lt;/LI-CODE&gt;&lt;P&gt;Despite this, the scope parameter in the URL only includes the first two scopes, and the third scope (and any others I add) are missing.&lt;/P&gt;&lt;P&gt;Has anyone else encountered this? What could cause scopes to be omitted from the authorization URL when building it in React? Any tips or ideas to debug this would be appreciated!&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 May 2025 15:19:07 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Spotify-for-Developers/Spotify-OAuth-Scope-Parameter-Not-Included-In-Authorisation-URL/m-p/6985102#M17991</guid>
      <dc:creator>Tommyboy0797</dc:creator>
      <dc:date>2025-05-27T15:19:07Z</dc:date>
    </item>
  </channel>
</rss>

