<?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 Invalid Access Code when using multiple scopes. in Spotify for Developers</title>
    <link>https://community.spotify.com/t5/Spotify-for-Developers/Invalid-Access-Code-when-using-multiple-scopes/m-p/5239016#M2986</link>
    <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&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;&lt;STRONG&gt;Ireland&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&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;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;When following the&amp;nbsp;authorisation flow, everything works as expected if I use just one scope. E.g.&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;scopes&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;'user-read-currently-playing'&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;url&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;Request&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'GET'&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;'&lt;A href="https://accounts.spotify.com/authorize" target="_blank"&gt;https://accounts.spotify.com/authorize&lt;/A&gt;'&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;params&lt;/SPAN&gt;&lt;SPAN&gt;={&lt;/SPAN&gt;&lt;SPAN&gt;'scope'&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;SPAN&gt;scopes&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;'response_type'&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;SPAN&gt;'code'&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;'redirect_uri'&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;SPAN&gt;REDIRECT_URI&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;'client_id'&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;SPAN&gt;CLIENT_ID&lt;/SPAN&gt;&lt;SPAN&gt;}).&lt;/SPAN&gt;&lt;SPAN&gt;prepare&lt;/SPAN&gt;&lt;SPAN&gt;().&lt;/SPAN&gt;&lt;SPAN&gt;url&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;- client visits this prepared url, gives access, and I get the following response back to my callback after sending the code I get from the client.&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;P&gt;&lt;SPAN&gt;{'access_token': 'BQCBQEcfGhdZEHZYQgZ1Ny8CAkzgqSwjTUIdbpnX8xSo1iOO8E4-aFPniPsjxtCwEgGQyUrxIAUyeSyobPYGaKwyRkM0j_GWzMBipPvX2EtpFdJYgXnNjzqxRjxGmC6QmdS_Mm4W22XWM_7p2AA', 'token_type': 'Bearer', 'expires_in': 3600, 'refresh_token': 'AQCm-7TngixLDTHLioOT44eu_mhpGdg0JhukvDLxtNvFC38y1FNJWZW7MQEbXp1DIZwBEx4n5XHaeEp4_Gb9jTUJBtFDFKqQPvB6Zq4NEapXxQ7frQrq9OvhqygjTBi0epw', 'scope': 'user-read-currently-playing'}&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;- Perfect, I then can hit the currently-playing endpoint and get the details of the song that is playing.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Now, I try to add extra permissions to my scope. For e.g. I follow the exact same steps but with the following:&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;scopes = 'user-read-currently-playing streaming'&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I get this response to my callback&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;{'access_token': 'BQBFNzQRjh5moOwY_pQSO8n8CwT0x_eJg79QztZKTmVaItbHo-eQSnM7uhjKSWeQeOmjGRO5y_zb78md6SiIxRe-kkHUpSYosU-yIxrba5DD-K4yZrptk_7n5B0Bm7jkb-GZqmoSowNwtLW3n8_URCM', 'token_type': 'Bearer', 'expires_in': 3600, 'refresh_token': 'AQAfCeI1FkPskXTDLlYSEcXuELHXr7Zv30J_oO_9DvHagmSOg25__fwhGMsY45B6Iyc1LmYiF-WNpmHN22A_-12giF1rW-EAz_AIsdD0ZK5VKL4_KsDLRUetGASWq4ygKNA', 'scope': 'streaming user-read-currently-playing'}&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Looks good to me? I have received permission to the scopes I requested.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I try to hit the currently-playing endpoint again with this access code. This is the response&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;{'error': {'status': 401, 'message': 'Invalid access token'}}&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I have deleted apps, made new ones, tried different combinations of scopes. Nothing is working and I cannot figure it out. Any help is appreciated. Thanks&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 24 Jul 2021 16:54:25 GMT</pubDate>
    <dc:creator>Briry12</dc:creator>
    <dc:date>2021-07-24T16:54:25Z</dc:date>
    <item>
      <title>Invalid Access Code when using multiple scopes.</title>
      <link>https://community.spotify.com/t5/Spotify-for-Developers/Invalid-Access-Code-when-using-multiple-scopes/m-p/5239016#M2986</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&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;&lt;STRONG&gt;Ireland&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&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;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;When following the&amp;nbsp;authorisation flow, everything works as expected if I use just one scope. E.g.&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;scopes&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;'user-read-currently-playing'&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;url&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;Request&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'GET'&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;'&lt;A href="https://accounts.spotify.com/authorize" target="_blank"&gt;https://accounts.spotify.com/authorize&lt;/A&gt;'&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;params&lt;/SPAN&gt;&lt;SPAN&gt;={&lt;/SPAN&gt;&lt;SPAN&gt;'scope'&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;SPAN&gt;scopes&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;'response_type'&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;SPAN&gt;'code'&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;'redirect_uri'&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;SPAN&gt;REDIRECT_URI&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;'client_id'&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;SPAN&gt;CLIENT_ID&lt;/SPAN&gt;&lt;SPAN&gt;}).&lt;/SPAN&gt;&lt;SPAN&gt;prepare&lt;/SPAN&gt;&lt;SPAN&gt;().&lt;/SPAN&gt;&lt;SPAN&gt;url&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;- client visits this prepared url, gives access, and I get the following response back to my callback after sending the code I get from the client.&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;P&gt;&lt;SPAN&gt;{'access_token': 'BQCBQEcfGhdZEHZYQgZ1Ny8CAkzgqSwjTUIdbpnX8xSo1iOO8E4-aFPniPsjxtCwEgGQyUrxIAUyeSyobPYGaKwyRkM0j_GWzMBipPvX2EtpFdJYgXnNjzqxRjxGmC6QmdS_Mm4W22XWM_7p2AA', 'token_type': 'Bearer', 'expires_in': 3600, 'refresh_token': 'AQCm-7TngixLDTHLioOT44eu_mhpGdg0JhukvDLxtNvFC38y1FNJWZW7MQEbXp1DIZwBEx4n5XHaeEp4_Gb9jTUJBtFDFKqQPvB6Zq4NEapXxQ7frQrq9OvhqygjTBi0epw', 'scope': 'user-read-currently-playing'}&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;- Perfect, I then can hit the currently-playing endpoint and get the details of the song that is playing.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Now, I try to add extra permissions to my scope. For e.g. I follow the exact same steps but with the following:&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;scopes = 'user-read-currently-playing streaming'&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I get this response to my callback&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;{'access_token': 'BQBFNzQRjh5moOwY_pQSO8n8CwT0x_eJg79QztZKTmVaItbHo-eQSnM7uhjKSWeQeOmjGRO5y_zb78md6SiIxRe-kkHUpSYosU-yIxrba5DD-K4yZrptk_7n5B0Bm7jkb-GZqmoSowNwtLW3n8_URCM', 'token_type': 'Bearer', 'expires_in': 3600, 'refresh_token': 'AQAfCeI1FkPskXTDLlYSEcXuELHXr7Zv30J_oO_9DvHagmSOg25__fwhGMsY45B6Iyc1LmYiF-WNpmHN22A_-12giF1rW-EAz_AIsdD0ZK5VKL4_KsDLRUetGASWq4ygKNA', 'scope': 'streaming user-read-currently-playing'}&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Looks good to me? I have received permission to the scopes I requested.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I try to hit the currently-playing endpoint again with this access code. This is the response&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;{'error': {'status': 401, 'message': 'Invalid access token'}}&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I have deleted apps, made new ones, tried different combinations of scopes. Nothing is working and I cannot figure it out. Any help is appreciated. Thanks&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 24 Jul 2021 16:54:25 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Spotify-for-Developers/Invalid-Access-Code-when-using-multiple-scopes/m-p/5239016#M2986</guid>
      <dc:creator>Briry12</dc:creator>
      <dc:date>2021-07-24T16:54:25Z</dc:date>
    </item>
    <item>
      <title>Re: Invalid Access Code when using multiple scopes.</title>
      <link>https://community.spotify.com/t5/Spotify-for-Developers/Invalid-Access-Code-when-using-multiple-scopes/m-p/5239077#M2988</link>
      <description>&lt;P&gt;Oh my god. I was standing in the kitchen eating an apple and I had an epiphany. I had a max chars parameters on the access_token field in my django model. And yep - with certain scopes added the access token was longer than 150, and so I was cutting off the last few characters. that was the worst saturday of my life&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;over and out.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 24 Jul 2021 22:43:27 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Spotify-for-Developers/Invalid-Access-Code-when-using-multiple-scopes/m-p/5239077#M2988</guid>
      <dc:creator>Briry12</dc:creator>
      <dc:date>2021-07-24T22:43:27Z</dc:date>
    </item>
  </channel>
</rss>

