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

Is the WEB API Access Token not the same used for the Playback SDK?

Solved!

Is the WEB API Access Token not the same used for the Playback SDK?

Plan

Premium

Country

South Africa

Device

(Lenovo Laptop)

Operating System

(Windows 10)

 

My Question or Issue

I'm currently using the WEB API and logging in with my current account and it provides me with an access token. I use that token to make general calls to the api endpoints and that works all fine and well, but now I want to use the playback SDK and for some reason it returns a 403 error saying my token is out of scope when I try to connect to the player, but if I hard code in an authentication token from the SDK quickstart from here Quick Start | Spotify for Developers its works just fine

Is there a way to receive a token that autheticates both the API calls and the SDK connection?

 

Reply

Accepted Solutions
Marked as solution

Will mark this as solution since its correct, but also wanna post something weird about the auth url structure. Most of the guides I found had a specific structure and called the auth endpoints like so:

https://accounts.spotify.com/en/authorize?client_id=<myclientid>&redirect_uri=http://localhost:3000&scope=streaming%20user-modify-playback-state%20user-read-playback-state%20user...

 

But this never worked, so I checked the free auth token from the docs Quick Start | Spotify for Developers and that worked fine and it looked like this:
https://accounts.spotify.com/en/authorize?response_type=token&client_id=<myclientid>&redirect_uri=ht...

 

So after adding the scopes needed I also restructured my url (replaced redirect to my local)  and it seems to work in that format, was it an update or something? 

 

 

 

 

 

 

View solution in original post

2 Replies

The access token need to be request with the right scopes.

The scopes you need is streaming.

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.
Marked as solution

Will mark this as solution since its correct, but also wanna post something weird about the auth url structure. Most of the guides I found had a specific structure and called the auth endpoints like so:

https://accounts.spotify.com/en/authorize?client_id=<myclientid>&redirect_uri=http://localhost:3000&scope=streaming%20user-modify-playback-state%20user-read-playback-state%20user...

 

But this never worked, so I checked the free auth token from the docs Quick Start | Spotify for Developers and that worked fine and it looked like this:
https://accounts.spotify.com/en/authorize?response_type=token&client_id=<myclientid>&redirect_uri=ht...

 

So after adding the scopes needed I also restructured my url (replaced redirect to my local)  and it seems to work in that format, was it an update or something? 

 

 

 

 

 

 

Suggested posts