<?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: Upload Custom Playlist Cover with Python in Spotify for Developers</title>
    <link>https://community.spotify.com/t5/Spotify-for-Developers/Upload-Custom-Playlist-Cover-with-Python/m-p/5468107#M7242</link>
    <description>&lt;P&gt;You can add `&lt;SPAN&gt;verify=&lt;/SPAN&gt;&lt;SPAN class=""&gt;False` inside the `requests.put()` and try if that works.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Sun, 04 Dec 2022 08:19:59 GMT</pubDate>
    <dc:creator>Ximzend</dc:creator>
    <dc:date>2022-12-04T08:19:59Z</dc:date>
    <item>
      <title>Upload Custom Playlist Cover with Python</title>
      <link>https://community.spotify.com/t5/Spotify-for-Developers/Upload-Custom-Playlist-Cover-with-Python/m-p/5467784#M7235</link>
      <description>&lt;P&gt;&lt;STRONG&gt;My Question or Issue&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Hi! I'm having trouble with uploading custom image to playlist cover. Here's my code:&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;def &lt;/SPAN&gt;&lt;SPAN&gt;add_playlist_cover&lt;/SPAN&gt;(playlist_id&lt;SPAN&gt;, &lt;/SPAN&gt;token):&lt;BR /&gt;    &lt;SPAN&gt;with &lt;/SPAN&gt;&lt;SPAN&gt;open&lt;/SPAN&gt;(&lt;SPAN&gt;'cover.jpg'&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;'rb'&lt;/SPAN&gt;) &lt;SPAN&gt;as &lt;/SPAN&gt;f:&lt;BR /&gt;        data = base64.b64encode(f.read())&lt;BR /&gt;        auth_header = {&lt;SPAN&gt;"Authorization"&lt;/SPAN&gt;: &lt;SPAN&gt;f"Bearer &lt;/SPAN&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;token&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;'Content-Type'&lt;/SPAN&gt;:&lt;SPAN&gt;'image/jpeg'&lt;/SPAN&gt;}&lt;BR /&gt;        url = &lt;SPAN&gt;f'https://api.spotify.com/v1/playlists/&lt;/SPAN&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;playlist_id&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;SPAN&gt;/images'&lt;BR /&gt;&lt;/SPAN&gt;        r = requests.put(url&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;headers&lt;/SPAN&gt;=auth_header&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;data&lt;/SPAN&gt;=data)&lt;BR /&gt;        &lt;SPAN&gt;print&lt;/SPAN&gt;(r.json())&lt;/PRE&gt;&lt;P&gt;I've tried Content-Type as image/jpeg and as application/json and still got an error&amp;nbsp;requests.exceptions.SSLError: HTTPSConnectionPool(host='api.spotify.com', port=443)&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Can someone help me out? Thanks in advance&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 03 Dec 2022 16:19:32 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Spotify-for-Developers/Upload-Custom-Playlist-Cover-with-Python/m-p/5467784#M7235</guid>
      <dc:creator>znnntn</dc:creator>
      <dc:date>2022-12-03T16:19:32Z</dc:date>
    </item>
    <item>
      <title>Re: Upload Custom Playlist Cover with Python</title>
      <link>https://community.spotify.com/t5/Spotify-for-Developers/Upload-Custom-Playlist-Cover-with-Python/m-p/5468107#M7242</link>
      <description>&lt;P&gt;You can add `&lt;SPAN&gt;verify=&lt;/SPAN&gt;&lt;SPAN class=""&gt;False` inside the `requests.put()` and try if that works.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 04 Dec 2022 08:19:59 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Spotify-for-Developers/Upload-Custom-Playlist-Cover-with-Python/m-p/5468107#M7242</guid>
      <dc:creator>Ximzend</dc:creator>
      <dc:date>2022-12-04T08:19:59Z</dc:date>
    </item>
    <item>
      <title>Re: Upload Custom Playlist Cover with Python</title>
      <link>https://community.spotify.com/t5/Spotify-for-Developers/Upload-Custom-Playlist-Cover-with-Python/m-p/5468500#M7252</link>
      <description>&lt;P&gt;Did you ensure that the image is less than or equal to 256kb in size?&lt;/P&gt;</description>
      <pubDate>Mon, 05 Dec 2022 01:30:49 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Spotify-for-Developers/Upload-Custom-Playlist-Cover-with-Python/m-p/5468500#M7252</guid>
      <dc:creator>Peter_Schorn</dc:creator>
      <dc:date>2022-12-05T01:30:49Z</dc:date>
    </item>
  </channel>
</rss>

