<?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 Client ID when trying to Authorize API in Spotify for Developers</title>
    <link>https://community.spotify.com/t5/Spotify-for-Developers/Invalid-Client-ID-when-trying-to-Authorize-API/m-p/5445338#M6752</link>
    <description>&lt;P&gt;I am trying to take the billboard top 100 songs from a given date and generate a spotify playlist. I have replaced my client ID and secret with random values for privacy. When I execute the code below, I am expecting a browser to pop up that asks me to agree to spotify conditions. I have edited the settings in the developer tab in spotify to the redirect URI below and have obtained the correct client ID and secret from my account.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Help greatly appreciated.&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;import &lt;/SPAN&gt;requests&lt;BR /&gt;&lt;SPAN&gt;from &lt;/SPAN&gt;bs4 &lt;SPAN&gt;import &lt;/SPAN&gt;BeautifulSoup&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;import &lt;/SPAN&gt;spotipy&lt;BR /&gt;&lt;SPAN&gt;from &lt;/SPAN&gt;spotipy.oauth2 &lt;SPAN&gt;import &lt;/SPAN&gt;SpotifyOAuth&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;CLIENT_ID = &lt;SPAN&gt;"abcde"&lt;BR /&gt;&lt;/SPAN&gt;CLIENT_SECRET = &lt;SPAN&gt;"1234"&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;date = &lt;SPAN&gt;input&lt;/SPAN&gt;(&lt;SPAN&gt;"What year do you want to travel to? Type the date in this format YYYY-MM-DD"&lt;/SPAN&gt;)&lt;BR /&gt;&lt;BR /&gt;URL = &lt;SPAN&gt;f"https://www.billboard.com/charts/hot-100/&lt;/SPAN&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;date&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;SPAN&gt;/"&lt;BR /&gt;&lt;/SPAN&gt;response = requests.get(URL)&lt;BR /&gt;webpage = response.text&lt;BR /&gt;&lt;SPAN&gt;print&lt;/SPAN&gt;(webpage)&lt;BR /&gt;soup = BeautifulSoup(webpage&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;"html.parser"&lt;/SPAN&gt;)&lt;BR /&gt;&lt;BR /&gt;title = soup.select(&lt;SPAN&gt;"li ul li h3"&lt;/SPAN&gt;)&lt;BR /&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;song_list = [title[song].getText().strip() &lt;SPAN&gt;for &lt;/SPAN&gt;song &lt;SPAN&gt;in &lt;/SPAN&gt;&lt;SPAN&gt;range&lt;/SPAN&gt;(&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;100&lt;/SPAN&gt;)]&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;print&lt;/SPAN&gt;(song_list)&lt;BR /&gt;&lt;BR /&gt;sp = spotipy.Spotify(&lt;SPAN&gt;auth_manager&lt;/SPAN&gt;=SpotifyOAuth(&lt;SPAN&gt;client_id&lt;/SPAN&gt;=&lt;SPAN&gt;"CLIENT_ID"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;BR /&gt;&lt;/SPAN&gt;                                                &lt;SPAN&gt;client_secret&lt;/SPAN&gt;=&lt;SPAN&gt;"CLIENT_SECRET"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;BR /&gt;&lt;/SPAN&gt;                                                &lt;SPAN&gt;redirect_uri&lt;/SPAN&gt;=&lt;SPAN&gt;"http://example.com"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;BR /&gt;&lt;/SPAN&gt;                                                &lt;SPAN&gt;scope&lt;/SPAN&gt;=&lt;SPAN&gt;"playlist-modify-private"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;BR /&gt;&lt;/SPAN&gt;                                               &lt;SPAN&gt;show_dialog &lt;/SPAN&gt;= &lt;SPAN&gt;True,&lt;BR /&gt;&lt;/SPAN&gt;                                               &lt;SPAN&gt;cache_path &lt;/SPAN&gt;= &lt;SPAN&gt;"token.txt"&lt;/SPAN&gt;)&lt;BR /&gt;                     )&lt;BR /&gt;&lt;BR /&gt;user_id = sp.current_user()[&lt;SPAN&gt;"id"&lt;/SPAN&gt;]&lt;/PRE&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;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 17 Oct 2022 02:13:01 GMT</pubDate>
    <dc:creator>varsha0726</dc:creator>
    <dc:date>2022-10-17T02:13:01Z</dc:date>
    <item>
      <title>Invalid Client ID when trying to Authorize API</title>
      <link>https://community.spotify.com/t5/Spotify-for-Developers/Invalid-Client-ID-when-trying-to-Authorize-API/m-p/5445338#M6752</link>
      <description>&lt;P&gt;I am trying to take the billboard top 100 songs from a given date and generate a spotify playlist. I have replaced my client ID and secret with random values for privacy. When I execute the code below, I am expecting a browser to pop up that asks me to agree to spotify conditions. I have edited the settings in the developer tab in spotify to the redirect URI below and have obtained the correct client ID and secret from my account.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Help greatly appreciated.&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;import &lt;/SPAN&gt;requests&lt;BR /&gt;&lt;SPAN&gt;from &lt;/SPAN&gt;bs4 &lt;SPAN&gt;import &lt;/SPAN&gt;BeautifulSoup&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;import &lt;/SPAN&gt;spotipy&lt;BR /&gt;&lt;SPAN&gt;from &lt;/SPAN&gt;spotipy.oauth2 &lt;SPAN&gt;import &lt;/SPAN&gt;SpotifyOAuth&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;CLIENT_ID = &lt;SPAN&gt;"abcde"&lt;BR /&gt;&lt;/SPAN&gt;CLIENT_SECRET = &lt;SPAN&gt;"1234"&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;date = &lt;SPAN&gt;input&lt;/SPAN&gt;(&lt;SPAN&gt;"What year do you want to travel to? Type the date in this format YYYY-MM-DD"&lt;/SPAN&gt;)&lt;BR /&gt;&lt;BR /&gt;URL = &lt;SPAN&gt;f"https://www.billboard.com/charts/hot-100/&lt;/SPAN&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;date&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;SPAN&gt;/"&lt;BR /&gt;&lt;/SPAN&gt;response = requests.get(URL)&lt;BR /&gt;webpage = response.text&lt;BR /&gt;&lt;SPAN&gt;print&lt;/SPAN&gt;(webpage)&lt;BR /&gt;soup = BeautifulSoup(webpage&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;"html.parser"&lt;/SPAN&gt;)&lt;BR /&gt;&lt;BR /&gt;title = soup.select(&lt;SPAN&gt;"li ul li h3"&lt;/SPAN&gt;)&lt;BR /&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;song_list = [title[song].getText().strip() &lt;SPAN&gt;for &lt;/SPAN&gt;song &lt;SPAN&gt;in &lt;/SPAN&gt;&lt;SPAN&gt;range&lt;/SPAN&gt;(&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;100&lt;/SPAN&gt;)]&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;print&lt;/SPAN&gt;(song_list)&lt;BR /&gt;&lt;BR /&gt;sp = spotipy.Spotify(&lt;SPAN&gt;auth_manager&lt;/SPAN&gt;=SpotifyOAuth(&lt;SPAN&gt;client_id&lt;/SPAN&gt;=&lt;SPAN&gt;"CLIENT_ID"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;BR /&gt;&lt;/SPAN&gt;                                                &lt;SPAN&gt;client_secret&lt;/SPAN&gt;=&lt;SPAN&gt;"CLIENT_SECRET"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;BR /&gt;&lt;/SPAN&gt;                                                &lt;SPAN&gt;redirect_uri&lt;/SPAN&gt;=&lt;SPAN&gt;"http://example.com"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;BR /&gt;&lt;/SPAN&gt;                                                &lt;SPAN&gt;scope&lt;/SPAN&gt;=&lt;SPAN&gt;"playlist-modify-private"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;BR /&gt;&lt;/SPAN&gt;                                               &lt;SPAN&gt;show_dialog &lt;/SPAN&gt;= &lt;SPAN&gt;True,&lt;BR /&gt;&lt;/SPAN&gt;                                               &lt;SPAN&gt;cache_path &lt;/SPAN&gt;= &lt;SPAN&gt;"token.txt"&lt;/SPAN&gt;)&lt;BR /&gt;                     )&lt;BR /&gt;&lt;BR /&gt;user_id = sp.current_user()[&lt;SPAN&gt;"id"&lt;/SPAN&gt;]&lt;/PRE&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;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Oct 2022 02:13:01 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Spotify-for-Developers/Invalid-Client-ID-when-trying-to-Authorize-API/m-p/5445338#M6752</guid>
      <dc:creator>varsha0726</dc:creator>
      <dc:date>2022-10-17T02:13:01Z</dc:date>
    </item>
    <item>
      <title>Re: Invalid Client ID when trying to Authorize API</title>
      <link>https://community.spotify.com/t5/Spotify-for-Developers/Invalid-Client-ID-when-trying-to-Authorize-API/m-p/5445516#M6755</link>
      <description>&lt;P&gt;You have&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;spotipy.Spotify(&lt;SPAN&gt;auth_manager&lt;/SPAN&gt;=SpotifyOAuth(&lt;SPAN&gt;client_id&lt;/SPAN&gt;=&lt;SPAN&gt;"CLIENT_ID",client_secret="CLIENT_SECRET",&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;in your code, but you need to remove the "quotes" around those variables. Else they are the strings "CLIENT_ID" and "CLIENT_SECRET".&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Oct 2022 14:11:24 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Spotify-for-Developers/Invalid-Client-ID-when-trying-to-Authorize-API/m-p/5445516#M6755</guid>
      <dc:creator>Ximzend</dc:creator>
      <dc:date>2022-10-17T14:11:24Z</dc:date>
    </item>
    <item>
      <title>Re: Invalid Client ID when trying to Authorize API</title>
      <link>https://community.spotify.com/t5/Spotify-for-Developers/Invalid-Client-ID-when-trying-to-Authorize-API/m-p/5445748#M6761</link>
      <description>&lt;P&gt;You are literally a godsend. I have been wondering what the heck is wrong with my code for like 5 days now. Thank you kind stranger!!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Oct 2022 01:49:47 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Spotify-for-Developers/Invalid-Client-ID-when-trying-to-Authorize-API/m-p/5445748#M6761</guid>
      <dc:creator>varsha0726</dc:creator>
      <dc:date>2022-10-18T01:49:47Z</dc:date>
    </item>
  </channel>
</rss>

