<?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: Trouble with Create Playlist in Spotify for Developers</title>
    <link>https://community.spotify.com/t5/Spotify-for-Developers/Trouble-with-Create-Playlist/m-p/6120605#M14142</link>
    <description>&lt;P&gt;Playlist creation worked fine for me until today.&lt;/P&gt;&lt;P&gt;Now, I have a 502 error.&lt;/P&gt;&lt;P&gt;I have it even when trying to create a playlist from here&amp;nbsp;&lt;A href="https://developer.spotify.com/documentation/web-api/reference/create-playlist" target="_blank"&gt;https://developer.spotify.com/documentation/web-api/reference/create-playlist&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 07 Jun 2024 10:36:46 GMT</pubDate>
    <dc:creator>litvakle</dc:creator>
    <dc:date>2024-06-07T10:36:46Z</dc:date>
    <item>
      <title>Trouble with Create Playlist</title>
      <link>https://community.spotify.com/t5/Spotify-for-Developers/Trouble-with-Create-Playlist/m-p/6119948#M14139</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;US&lt;STRONG&gt;&lt;BR /&gt;Device&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Node&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG&gt;Operating System&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Macos&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;My Question or Issue&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Today I set off to build a Spotify app. Everything was going swimmingly till I hit the createPlaylist endpoint.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I can log in and retrieve an access token, from there I am able to query for the user and get the user's id. I can list tracks in a playlist, but what I can't do is create a playlist. Any help would be awesome.&lt;BR /&gt;&lt;BR /&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;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;export const createPlaylist = async (accessToken, userId, playlistName) =&amp;gt; {
  const url = `https://api.spotify.com/v1/users/${userId}/playlists`;
  console.log(url);
  const headers = { Authorization: `Bearer ${accessToken}`, 'Content-Type': 'application/json' };
  const data = { name: playlistName, public: "false" };
  try {
    const response = await axios.post(url, data, { headers });
    return response.data;  // Assuming it returns the created playlist details
  } catch (error) {
    console.error('\n\nError creating playlist:\n', error);
    return null;
  }
};&lt;/LI-CODE&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;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Fri, 07 Jun 2024 04:18:35 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Spotify-for-Developers/Trouble-with-Create-Playlist/m-p/6119948#M14139</guid>
      <dc:creator>Phando</dc:creator>
      <dc:date>2024-06-07T04:18:35Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble with Create Playlist</title>
      <link>https://community.spotify.com/t5/Spotify-for-Developers/Trouble-with-Create-Playlist/m-p/6120029#M14140</link>
      <description>&lt;P&gt;Do you have used the right scopes? You can find them at the top of each endpoint reference page.&lt;/P&gt;</description>
      <pubDate>Fri, 07 Jun 2024 05:29:05 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Spotify-for-Developers/Trouble-with-Create-Playlist/m-p/6120029#M14140</guid>
      <dc:creator>Ximzend</dc:creator>
      <dc:date>2024-06-07T05:29:05Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble with Create Playlist</title>
      <link>https://community.spotify.com/t5/Spotify-for-Developers/Trouble-with-Create-Playlist/m-p/6120605#M14142</link>
      <description>&lt;P&gt;Playlist creation worked fine for me until today.&lt;/P&gt;&lt;P&gt;Now, I have a 502 error.&lt;/P&gt;&lt;P&gt;I have it even when trying to create a playlist from here&amp;nbsp;&lt;A href="https://developer.spotify.com/documentation/web-api/reference/create-playlist" target="_blank"&gt;https://developer.spotify.com/documentation/web-api/reference/create-playlist&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Jun 2024 10:36:46 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Spotify-for-Developers/Trouble-with-Create-Playlist/m-p/6120605#M14142</guid>
      <dc:creator>litvakle</dc:creator>
      <dc:date>2024-06-07T10:36:46Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble with Create Playlist</title>
      <link>https://community.spotify.com/t5/Spotify-for-Developers/Trouble-with-Create-Playlist/m-p/6356279#M15064</link>
      <description>&lt;P&gt;Yes I got an error but it works perfectly fine at the developers page.&lt;BR /&gt;&lt;BR /&gt;"error": {"status": 403, "message": "Insufficient client scope"&lt;/P&gt;</description>
      <pubDate>Thu, 19 Sep 2024 13:10:44 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Spotify-for-Developers/Trouble-with-Create-Playlist/m-p/6356279#M15064</guid>
      <dc:creator>krozer808</dc:creator>
      <dc:date>2024-09-19T13:10:44Z</dc:date>
    </item>
  </channel>
</rss>

