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

SDK error on PUT request at "Pause a User's Playback" Endpoint

SDK error on PUT request at "Pause a User's Playback" Endpoint

Plan

Premium

Country

Australia

 

Device

Dell XPS

Operating System

Linux Peppermint

 

My Question or Issue

 

I've successfully been able to play a track via the SDK. However, once the song start playing, I can't seem to get it to pause. A fetch request to the "Pause a User's Playback" endpoint repeatedly throws a 403 error (with reason: UNKNOWN). I have confirmed that the device ID is correct. The access token I'm using is the one that can be generated from the platform (https://developer.spotify.com/documentation/web-playback-sdk/quick-start/#). I intend to change this later, right now I'm using it to test). The same token works when used to play the song, but I cannot seem to pause it (and the API error message isnt helpful at all). I've attached herewith the faulty code. Please advice.

 

fetch(
    {
        method: "PUT",
        headers: {
            "Content-Type": "application/json",
            Authorization: `Bearer ${token}`,
         },
    }
);

 

Reply
0 Replies

Suggested posts