Web SDK Invalid Scope
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Plan
Premium Student
Country
United Kingdom
Device
Desktop
Operating System
Windows 10
My Question or Issue
Hi all, I am trying to follow the Web SDK guide https://developer.spotify.com/documentation/web-playback-sdk/tutorials/getting-started
However I am running into an issue where I get the following console errors:
- GET https://api.spotify.com/v1/melody/v1/check_scope?scope=web-playback 403
- Invalid token scopes
- PUT https://cpapi.spotify.com/v1/client/not-sure-if-this-is-sensitive
- This functionality is restricted to premium users only
I am a premium user, and I am using the following scopes:
"user-read-private",
"user-read-email"
"user-top-read"
"streaming"
"user-modify-playback-state"
"app-remote-control"
I've tried to add the scope that it seems to be trying to call "web-playback", but then get an illegal scope error. When using the authentication token provided on the actual tutorial page, the app seems to work, it's just when I generate the token myself. The only difference I can see between my scopes and the one the tutorial uses is "openid", however this also returns an illegal scope when I use it.
Has anyone also encountered this error? I'm programming using Python Flask, and making a manual requests call to get the authentication token. Below is how I am authenticating
@auth_blueprint.route('/auth/login')
def login():
sp_oauth = spotipy.oauth2.SpotifyOAuth(
client_id=SpotifyCreds.CLIENT_ID,
client_secret=SpotifyCreds.CLIENT_SECRET,
redirect_uri=config.HOSTNAME + url_for("auth_blueprint.callback"),
scope=",".join(SpotifyCreds.SCOPES)
)
auth_url = sp_oauth.get_authorize_url()
return redirect(auth_url)
@auth_blueprint.route('/auth/callback')
def callback():
authorization_code = request.args.get('code')
if auth_service.callback(authorization_code):
return redirect(url_for("main_blueprint.home"))
else:
return redirect(url_for("auth_blueprint.login"))
Many thanks for anyone that's taken a look into this!
- Labels:
-
Question
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page