The player API returns HTTP response 202 instead of 204
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The documentation about the play / pause functionality of the Web Player API (https://developer.spotify.com/documentation/web-api/reference/pause-a-users-playback) lists 204 as the expected response to a successful request, but instead the API returns 202.
So:
Expected HTTP response code: 204
Actual HTTP response code: 202
Method: PUT, RequestUri: 'https://api.spotify.com/v1/me/player/play', Version: 2.0, Content: <null>, Headers:
{
Authorization: Bearer ***REDACTED***
Accept: application/json
Cache-Control: no-cache
}
StatusCode: 202, ReasonPhrase: '', Version: 2.0, Content: System.Net.Http.StreamContent, Headers:
{
Via: HTTP/2 edgeproxy
Via: 1.1 google
Server: envoy
Strict-Transport-Security: max-age=31536000
Alt-Svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000
Access-Control-Max-Age: 604800
Cache-Control: max-age=0, private
Date: Sat, 29 Jul 2023 21:56:44 GMT
Access-Control-Allow-Credentials: true
Access-Control-Allow-Headers: Accept, App-Platform, Authorization, Content-Type, Origin, Retry-After, Spotify-App-Version, X-Cloud-Trace-Context, client-token, content-access-token
Access-Control-Allow-Origin: *
X-Content-Type-Options: nosniff
x-robots-tag: noindex, nofollow
Access-Control-Allow-Methods: GET, POST, OPTIONS, PUT, DELETE, PATCH
Content-Length: 0
}
- Labels:
-
Possible Bug
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page