Announcements

Help Wizard

Step 1

NEXT STEP

FAQs

Please see below the most popular frequently asked questions.

Loading article...

Loading faqs...

VIEW ALL

Ongoing Issues

Please see below the current ongoing issues which are under investigation.

Loading issue...

Loading ongoing issues...

VIEW ALL

The player API returns HTTP response 202 instead of 204

The player API returns HTTP response 202 instead of 204

 

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
}

Reply
0 Replies

Suggested posts

Type a product name