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

Issue with Web Playback SDK API Access for Spotify Premium

Issue with Web Playback SDK API Access for Spotify Premium

Plan

Premium Mini

Country India

 

Device

Windows

Operating System

 Windows 10

 

My Question or Issue

Recently, I upgraded to Spotify Premium with the intention of utilizing the Web Playback SDK API for my web page. However, upon attempting to integrate the API into my project, I encountered an error message stating: "This functionality is restricted to premium users only."

Why i am getting like this even i have taken Premium?

Reply
7 Replies

I guess you get this error message because you are using Client Credentials, and that is not supposed by the Web Playback SDK.

XimzendSpotify Star
Help others find this answer and click "Accept as Solution".
If you appreciate my answer, maybe give me a Like.
Note: I'm not a Spotify employee.

Hi, Thanks for the response, and i am using the example code which is given my spotify itself, even i am getting the same error


<!DOCTYPE html>
<html>
<head>
<title>Spotify Web Playback SDK Quick Start</title>
</head>
<body>
<h1>Spotify Web Playback SDK Quick Start</h1>
<button id="togglePlay">Toggle Play</button>

<script src="https://sdk.scdn.co/spotify-player.js"></script>
<script>
window.onSpotifyWebPlaybackSDKReady = () => {
const token = '[My access token]';
const player = new Spotify.Player({
name: 'Web Playback SDK Quick Start Player',
getOAuthToken: cb => { cb(token); },
volume: 0.5
});

// Ready
player.addListener('ready', ({ device_id }) => {
console.log('Ready with Device ID', device_id);
});

// Not Ready
player.addListener('not_ready', ({ device_id }) => {
console.log('Device ID has gone offline', device_id);
});

player.addListener('initialization_error', ({ message }) => {
console.error(message);
});

player.addListener('authentication_error', ({ message }) => {
console.error(message);
});

player.addListener('account_error', ({ message }) => {
console.error(message);
});

document.getElementById('togglePlay').onclick = function() {
player.togglePlay();
};

player.connect();
}
</script>
</body>
</html>

So, you did follow this guide and used the token you got by pressing the button?

XimzendSpotify Star
Help others find this answer and click "Accept as Solution".
If you appreciate my answer, maybe give me a Like.
Note: I'm not a Spotify employee.

The next step is to integrate an authorization flow

XimzendSpotify Star
Help others find this answer and click "Accept as Solution".
If you appreciate my answer, maybe give me a Like.
Note: I'm not a Spotify employee.

yeah, I have used the token, and followed the guidance, but i am getting the same error like "This functionality is restricted to premium users only"

does this feature is not applicable for mini premium users?

I don't know. You can try if playing in browser works at https://nelson.glitch.me/ or https://nelson-v2.glitch.me/

If that doesn't work, it's caused by your subscription.

XimzendSpotify Star
Help others find this answer and click "Accept as Solution".
If you appreciate my answer, maybe give me a Like.
Note: I'm not a Spotify employee.

Suggested posts

Staff
Let's introduce ourselves!

Hey there you,   Yeah, you! 😁   Welcome - we're glad you joined the Spotify Community!   While you here, let's have a fun game and get…

Staff
ModeratorStaff / Moderator/ 4 years ago  in Social & Random

Type a product name