<?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: Is the API failing? in Spotify for Developers</title>
    <link>https://community.spotify.com/t5/Spotify-for-Developers/Is-the-API-failing/m-p/5569712#M8971</link>
    <description>&lt;P&gt;You can try to get a new token with the &lt;EM&gt;user-read-playback-state&lt;/EM&gt; and&amp;nbsp;&lt;EM&gt;user-modify-playback-state&lt;/EM&gt; scopes.&lt;/P&gt;</description>
    <pubDate>Tue, 25 Apr 2023 19:32:16 GMT</pubDate>
    <dc:creator>Ximzend</dc:creator>
    <dc:date>2023-04-25T19:32:16Z</dc:date>
    <item>
      <title>Is the API failing?</title>
      <link>https://community.spotify.com/t5/Spotify-for-Developers/Is-the-API-failing/m-p/5569104#M8960</link>
      <description>&lt;P&gt;I am a recent new developer, but I had my application working great just a couple of weeks ago.&amp;nbsp; &amp;nbsp; Through the API, I had my application doing just about everything I wanted&amp;nbsp; (adjust volume, start a playlist, do previous and next track, pause, resume).&amp;nbsp; &amp;nbsp;I took about 10 days off.&amp;nbsp; Now most things are not working.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It seems that my GET calls to the API work, but not PUTs.&lt;/P&gt;&lt;P&gt;Is anyone else having this problem?&lt;/P&gt;</description>
      <pubDate>Tue, 25 Apr 2023 04:03:55 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Spotify-for-Developers/Is-the-API-failing/m-p/5569104#M8960</guid>
      <dc:creator>KevinReagan</dc:creator>
      <dc:date>2023-04-25T04:03:55Z</dc:date>
    </item>
    <item>
      <title>Re: Is the API failing?</title>
      <link>https://community.spotify.com/t5/Spotify-for-Developers/Is-the-API-failing/m-p/5569125#M8961</link>
      <description>&lt;P&gt;What does your code do? How do you get an Access token, an with which &lt;A href="https://developer.spotify.com/documentation/web-api/concepts/scopes" target="_blank" rel="noopener"&gt;Scopes&lt;/A&gt;?&lt;/P&gt;</description>
      <pubDate>Tue, 25 Apr 2023 05:20:24 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Spotify-for-Developers/Is-the-API-failing/m-p/5569125#M8961</guid>
      <dc:creator>Ximzend</dc:creator>
      <dc:date>2023-04-25T05:20:24Z</dc:date>
    </item>
    <item>
      <title>Re: Is the API failing?</title>
      <link>https://community.spotify.com/t5/Spotify-for-Developers/Is-the-API-failing/m-p/5569566#M8969</link>
      <description>&lt;P&gt;I don't remember which scopes I originally requested, but my application was working fully just 2 weeks ago.&amp;nbsp; &amp;nbsp;Here are some clips from my code:&lt;/P&gt;&lt;P&gt;1. I am able to get the access token successfully&lt;/P&gt;&lt;P&gt;2. I am able to run GETs like get list of devices&lt;/P&gt;&lt;P&gt;3.&amp;nbsp; I am unable to run PUTs like set volume.&amp;nbsp; &amp;nbsp;This worked two weeks ago.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for any help you can give me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;#*************************************************************************&lt;BR /&gt;# Get Spotify access token&lt;BR /&gt;#*************************************************************************&lt;BR /&gt;lUrl = f"&lt;A href="https://accounts.spotify.com/api/token" target="_blank"&gt;https://accounts.spotify.com/api/token&lt;/A&gt;"&lt;BR /&gt;headers = {}&lt;BR /&gt;data = {}&lt;BR /&gt;&lt;BR /&gt;# Encode as Base64&lt;BR /&gt;message = f"{gClientId}:{gClientSecret}"&lt;BR /&gt;messageBytes = message.encode('ascii')&lt;BR /&gt;base64Bytes = base64.b64encode(messageBytes)&lt;BR /&gt;base64Message = base64Bytes.decode('ascii')&lt;BR /&gt;&lt;BR /&gt;headers['Authorization'] = f"Basic {base64Message}"&lt;BR /&gt;&lt;BR /&gt;data['grant_type'] = "refresh_token"&lt;BR /&gt;data['refresh_token'] = gAuthorizationRefreshToken&lt;/P&gt;&lt;P&gt;res = requests.post(lUrl, headers=headers, data=data)&lt;BR /&gt;&lt;BR /&gt;gToken = res.json()['access_token']&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;#*************************************************************************&lt;BR /&gt;# Get a list of devices&lt;BR /&gt;#*************************************************************************&lt;/P&gt;&lt;P&gt;lUrl = f"&lt;A href="https://api.spotify.com/v1/me/player/devices" target="_blank"&gt;https://api.spotify.com/v1/me/player/devices&lt;/A&gt;"&lt;/P&gt;&lt;P&gt;headers = {&lt;BR /&gt;"Authorization": "Bearer " + gToken&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;res = requests.get(url=lUrl, headers=headers)&lt;BR /&gt;lres = json.dumps(res.json(), indent=2)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;#*************************************************************************&lt;BR /&gt;# Set Volume&lt;BR /&gt;#*************************************************************************&lt;/P&gt;&lt;P&gt;print("Entered Volume Routine")&lt;/P&gt;&lt;P&gt;Volurl = f"&lt;A href="https://api.spotify.com/v1/me/player/volume?volume_percent=" target="_blank"&gt;https://api.spotify.com/v1/me/player/volume?volume_percent=&lt;/A&gt;" + str(ActionValue1) + "&amp;amp;device_id=" + gDevice&lt;BR /&gt;&lt;BR /&gt;headers = {&lt;BR /&gt;"Authorization": "Bearer " + gToken&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;print(Volurl)&lt;BR /&gt;res = requests.put(url=Volurl, headers=headers)&lt;BR /&gt;print(res)&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;</description>
      <pubDate>Tue, 25 Apr 2023 15:40:59 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Spotify-for-Developers/Is-the-API-failing/m-p/5569566#M8969</guid>
      <dc:creator>KevinReagan</dc:creator>
      <dc:date>2023-04-25T15:40:59Z</dc:date>
    </item>
    <item>
      <title>Re: Is the API failing?</title>
      <link>https://community.spotify.com/t5/Spotify-for-Developers/Is-the-API-failing/m-p/5569712#M8971</link>
      <description>&lt;P&gt;You can try to get a new token with the &lt;EM&gt;user-read-playback-state&lt;/EM&gt; and&amp;nbsp;&lt;EM&gt;user-modify-playback-state&lt;/EM&gt; scopes.&lt;/P&gt;</description>
      <pubDate>Tue, 25 Apr 2023 19:32:16 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Spotify-for-Developers/Is-the-API-failing/m-p/5569712#M8971</guid>
      <dc:creator>Ximzend</dc:creator>
      <dc:date>2023-04-25T19:32:16Z</dc:date>
    </item>
    <item>
      <title>Re: Is the API failing?</title>
      <link>https://community.spotify.com/t5/Spotify-for-Developers/Is-the-API-failing/m-p/5569727#M8974</link>
      <description>&lt;P&gt;Thank you.&amp;nbsp; I will try that.&amp;nbsp; &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Apr 2023 19:57:27 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Spotify-for-Developers/Is-the-API-failing/m-p/5569727#M8974</guid>
      <dc:creator>KevinReagan</dc:creator>
      <dc:date>2023-04-25T19:57:27Z</dc:date>
    </item>
    <item>
      <title>Re: Is the API failing?</title>
      <link>https://community.spotify.com/t5/Spotify-for-Developers/Is-the-API-failing/m-p/5569772#M8976</link>
      <description>&lt;P&gt;What is interesting is that I am not getting any kind of a security response.&amp;nbsp; I am getting a 404 error.&amp;nbsp; &amp;nbsp;This made me think the API might have been down.&lt;/P&gt;</description>
      <pubDate>Tue, 25 Apr 2023 21:04:54 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Spotify-for-Developers/Is-the-API-failing/m-p/5569772#M8976</guid>
      <dc:creator>KevinReagan</dc:creator>
      <dc:date>2023-04-25T21:04:54Z</dc:date>
    </item>
    <item>
      <title>Re: Is the API failing?</title>
      <link>https://community.spotify.com/t5/Spotify-for-Developers/Is-the-API-failing/m-p/5569791#M8978</link>
      <description>&lt;P&gt;Could you maybe provide the response body that you're receiving alongside the 404? Might help.&lt;/P&gt;</description>
      <pubDate>Tue, 25 Apr 2023 21:33:12 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Spotify-for-Developers/Is-the-API-failing/m-p/5569791#M8978</guid>
      <dc:creator>jfk52917</dc:creator>
      <dc:date>2023-04-25T21:33:12Z</dc:date>
    </item>
    <item>
      <title>Re: Is the API failing?</title>
      <link>https://community.spotify.com/t5/Spotify-for-Developers/Is-the-API-failing/m-p/5569815#M8981</link>
      <description>&lt;P&gt;Thank you for asking for the response body.&amp;nbsp; I was only looking at the status code 404.&amp;nbsp; &amp;nbsp;Here is the full response:&lt;/P&gt;&lt;P&gt;{&lt;BR /&gt;"error": {&lt;BR /&gt;status": 404,&lt;BR /&gt;"message": "Device not found"&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But what is odd is that I know I specified the correct device id.&amp;nbsp; &amp;nbsp;I captured the api string:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://api.spotify.com/v1/me/player/volume?volume_percent=25&amp;amp;device_id=ac7607375393d07737dd2741baca2a1fb0e28320" target="_blank"&gt;https://api.spotify.com/v1/me/player/volume?volume_percent=25&amp;amp;device_id=ac7607375393d07737dd2741baca2a1fb0e28320&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;And that is a valid device on my system.&amp;nbsp; &amp;nbsp; I can see it when I query for my devices and I have double and tripled checked to see that the device id is correct..&amp;nbsp; &amp;nbsp;Any idea why the API would return invalid device?&lt;/SPAN&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;</description>
      <pubDate>Tue, 25 Apr 2023 22:14:40 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Spotify-for-Developers/Is-the-API-failing/m-p/5569815#M8981</guid>
      <dc:creator>KevinReagan</dc:creator>
      <dc:date>2023-04-25T22:14:40Z</dc:date>
    </item>
    <item>
      <title>Re: Is the API failing?</title>
      <link>https://community.spotify.com/t5/Spotify-for-Developers/Is-the-API-failing/m-p/5569827#M8982</link>
      <description>&lt;P&gt;Well, the problem turned out to be that my speakers (Amazon Echo Devices) needed to be rebooted.&amp;nbsp; Once I did this, my code started working again.&amp;nbsp; &amp;nbsp;Thank you all who made suggestions !!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Apr 2023 22:36:31 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Spotify-for-Developers/Is-the-API-failing/m-p/5569827#M8982</guid>
      <dc:creator>KevinReagan</dc:creator>
      <dc:date>2023-04-25T22:36:31Z</dc:date>
    </item>
  </channel>
</rss>

