<?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: Cannot update my playlist through the API in Spotify for Developers</title>
    <link>https://community.spotify.com/t5/Spotify-for-Developers/Cannot-update-my-playlist-through-the-API/m-p/5459884#M7078</link>
    <description>&lt;P&gt;I'm familiar with this flow but it assumes a web client with an interface in order to show a login page. I don't have a web application, only a server (AWS Lambda node.js function) that wants to interact with the Spotify API as a server-to-server. I'm the user who wants to manipulate his own playlists, not another user that will have to log in through a login page.&lt;/P&gt;&lt;P&gt;I'll try to ask it again, maybe more clearly:&lt;BR /&gt;Is there a Spotify API that could give me permission to add/delete from my own playlists that don't require a web client login page?&lt;/P&gt;</description>
    <pubDate>Sat, 19 Nov 2022 08:03:24 GMT</pubDate>
    <dc:creator>dulmanr</dc:creator>
    <dc:date>2022-11-19T08:03:24Z</dc:date>
    <item>
      <title>Cannot update my playlist through the API</title>
      <link>https://community.spotify.com/t5/Spotify-for-Developers/Cannot-update-my-playlist-through-the-API/m-p/5459161#M7071</link>
      <description>&lt;P&gt;Doing my own project and trying to automate the process of updating a playlist I own.&lt;BR /&gt;I've created an AWS Lambda that every week, at a certain time starts to run and retrieves the last added songs from one playlist and then updates the second playlist with these songs.&lt;/P&gt;&lt;P&gt;Since I don't have a user interface for the user to log in (It's my playlists) I used &lt;A href="https://developer.spotify.com/documentation/general/guides/authorization/client-credentials/" target="_self"&gt;Client Credentials Flow&lt;/A&gt;&lt;/P&gt;&lt;P&gt;After retrieving the token, and reading the last tracks added to the playlist I tried to use the token to update the second Playlist which failed with 403 and a message '&lt;SPAN&gt;This request requires user authentication.&lt;/SPAN&gt;'.&lt;BR /&gt;I've tried to add the post call of '&lt;SPAN&gt;&lt;A href="https://accounts.spotify.com/api/token" target="_blank" rel="noopener"&gt;https://accounts.spotify.com/api/token&lt;/A&gt;&lt;/SPAN&gt;&lt;SPAN&gt;' the scope param of '&lt;/SPAN&gt;&lt;SPAN&gt;playlist-modify-private playlist-modify-public user-library-read&lt;/SPAN&gt;&lt;SPAN&gt;' which didn't help &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;My question is:&lt;BR /&gt;Is what I'm trying to achieve possible without the user logging in using a web/mobile interface?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Nov 2022 15:58:37 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Spotify-for-Developers/Cannot-update-my-playlist-through-the-API/m-p/5459161#M7071</guid>
      <dc:creator>dulmanr</dc:creator>
      <dc:date>2022-11-17T15:58:37Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot update my playlist through the API</title>
      <link>https://community.spotify.com/t5/Spotify-for-Developers/Cannot-update-my-playlist-through-the-API/m-p/5459708#M7076</link>
      <description>&lt;P&gt;This can't be done with the Client Credentials Flow.&lt;/P&gt;&lt;P&gt;If you want to use &lt;A href="https://developer.spotify.com/documentation/general/guides/authorization/scopes/" target="_blank" rel="noopener"&gt;&lt;STRONG&gt;Authorization&lt;/STRONG&gt; Scopes&lt;/A&gt;&lt;SPAN&gt;, you have to use the&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://developer.spotify.com/documentation/general/guides/authorization/code-flow/" target="_blank" rel="noopener"&gt;&lt;STRONG&gt;Authorization&lt;/STRONG&gt; Code Flow&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Spotify will provide the login page when you follow this flow. You don't have to make one yourself.&lt;/P&gt;</description>
      <pubDate>Sat, 19 Nov 2022 07:07:45 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Spotify-for-Developers/Cannot-update-my-playlist-through-the-API/m-p/5459708#M7076</guid>
      <dc:creator>Ximzend</dc:creator>
      <dc:date>2022-11-19T07:07:45Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot update my playlist through the API</title>
      <link>https://community.spotify.com/t5/Spotify-for-Developers/Cannot-update-my-playlist-through-the-API/m-p/5459884#M7078</link>
      <description>&lt;P&gt;I'm familiar with this flow but it assumes a web client with an interface in order to show a login page. I don't have a web application, only a server (AWS Lambda node.js function) that wants to interact with the Spotify API as a server-to-server. I'm the user who wants to manipulate his own playlists, not another user that will have to log in through a login page.&lt;/P&gt;&lt;P&gt;I'll try to ask it again, maybe more clearly:&lt;BR /&gt;Is there a Spotify API that could give me permission to add/delete from my own playlists that don't require a web client login page?&lt;/P&gt;</description>
      <pubDate>Sat, 19 Nov 2022 08:03:24 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Spotify-for-Developers/Cannot-update-my-playlist-through-the-API/m-p/5459884#M7078</guid>
      <dc:creator>dulmanr</dc:creator>
      <dc:date>2022-11-19T08:03:24Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot update my playlist through the API</title>
      <link>https://community.spotify.com/t5/Spotify-for-Developers/Cannot-update-my-playlist-through-the-API/m-p/5460213#M7085</link>
      <description>&lt;P&gt;Sorry I didn't understand you directly, but you definitely need to implement the Authorization Code Flow.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To get the authorization code in step one you'll need for step two, you can just modify the below URL, and go to that URL with browser and log in:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://accounts.spotify.com/authorize" target="_blank" rel="noopener"&gt;https://accounts.spotify.com/authorize&lt;/A&gt;&lt;SPAN&gt;?client_id=&lt;/SPAN&gt;&lt;STRONG&gt;ClientID&lt;/STRONG&gt;&lt;SPAN&gt;&amp;amp;response_type=code&lt;/SPAN&gt;&lt;SPAN&gt;&amp;amp;redirect_uri=&lt;STRONG&gt;&lt;A href="http://mysite.com/callback/" target="_blank" rel="noopener"&gt;http://mysite.com/callback/&lt;/A&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;amp;state=&lt;STRONG&gt;secretCheckHash&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;amp;scope=&lt;STRONG&gt;playlist-read-private playlist-read-collaborative playlist-modify-private playlist-modify-public&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Note:&lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN&gt;You have to add the callback uri to your application at your &lt;A href="https://developer.spotify.com/dashboard/applications" target="_blank" rel="noopener"&gt;Dashboard&lt;/A&gt; for this to work.&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;With state (the secretCheckHash), you can check if the callback comes from you.&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Sun, 20 Nov 2022 07:25:26 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Spotify-for-Developers/Cannot-update-my-playlist-through-the-API/m-p/5460213#M7085</guid>
      <dc:creator>Ximzend</dc:creator>
      <dc:date>2022-11-20T07:25:26Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot update my playlist through the API</title>
      <link>https://community.spotify.com/t5/Spotify-for-Developers/Cannot-update-my-playlist-through-the-API/m-p/5462002#M7137</link>
      <description>&lt;P&gt;Do you have any plans to implement a server-to-server API that wouldn't require the authorization code flow that forces me to use a browser? Or there is already an existing one I'm not aware of?&lt;/P&gt;</description>
      <pubDate>Thu, 24 Nov 2022 10:02:24 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Spotify-for-Developers/Cannot-update-my-playlist-through-the-API/m-p/5462002#M7137</guid>
      <dc:creator>dulmanr</dc:creator>
      <dc:date>2022-11-24T10:02:24Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot update my playlist through the API</title>
      <link>https://community.spotify.com/t5/Spotify-for-Developers/Cannot-update-my-playlist-through-the-API/m-p/5462046#M7138</link>
      <description>&lt;P&gt;The only way to get a code to request a token the server can read and modify playlists with, is to use &lt;STRONG&gt;a browser&lt;/STRONG&gt; to login &lt;STRONG&gt;once&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;After that, you can use &lt;STRONG&gt;refresh token&lt;/STRONG&gt;s to get new tokens, as it's described at the&amp;nbsp;&lt;A href="https://developer.spotify.com/documentation/general/guides/authorization/code-flow/" target="_blank" rel="noopener nofollow noreferrer"&gt;Authorization&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;Code Flow&lt;/A&gt;&amp;nbsp;page.&lt;/P&gt;&lt;P&gt;There's no way around it.&lt;/P&gt;&lt;P&gt;Note: I'm saying&amp;nbsp;&lt;STRONG&gt;a browser&lt;/STRONG&gt;. It doesn't need to be a browser on your server. The only thing the &lt;STRONG&gt;server&lt;/STRONG&gt; needs to do, is handle the &lt;STRONG&gt;callback&lt;/STRONG&gt; when you go with&amp;nbsp;&lt;STRONG&gt;a browser&lt;/STRONG&gt; to that&amp;nbsp;&lt;STRONG&gt;modified URL&lt;/STRONG&gt;&amp;nbsp;I mentioned earlier and &lt;STRONG&gt;log in&lt;/STRONG&gt;.&lt;/P&gt;</description>
      <pubDate>Thu, 24 Nov 2022 12:25:40 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Spotify-for-Developers/Cannot-update-my-playlist-through-the-API/m-p/5462046#M7138</guid>
      <dc:creator>Ximzend</dc:creator>
      <dc:date>2022-11-24T12:25:40Z</dc:date>
    </item>
  </channel>
</rss>

