I wanna change cover image of playlist by API

 

Plan

Premium

Country

Japan

 

Operating System

Windows 10

 

My Question or Issue

Hi, I wanna change cover image of playlist by API of URL below.

https://developer.spotify.com/documentation/web-api/reference/#/operations/upload-custom-playlist-cover

 

But this document is lack of discription that how to send image file.

Probably, I anticipate that the image file should be Base64.

 

However, I don't know how to write in API.

 

I use axios.

How can I write in axios ?

 

Please help me.

 

 

 

Child Item
Child Item
Child Item

Accepted answers

All comments

I looked in the source code of a Web API Wrapper I'm using, and this is what I've found out: 

  • It needs to be a PUT request.
  • The payload needs to be a base 64 encoded string of an image.
  • The maximum payload size is 256 KB.
  • The content type needs to be "image/jpeg".
Child Item
Child Item