Plan
Premium
Country
Colombia
Device
Huawei Matebook D14
Operating System
Windows 11
My Question or Issue
In my code I get an error regarding the tokens or so I understand.
The error it shows me is the following:
HTTP Error for POST to https://api.spotify.com/v1/users/0cxaozs3a5z8m26vwzzc80wb9/playlists with Params: {} returned 403 due to Insufficient client scope
Traceback (most recent call last):
File "C:\Users\Cgalv\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\spotipy\client.py", line 269, in _internal_call
response.raise_for_status()
File "C:\Users\Cgalv\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\requests\models.py", line 1021, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: https://api.spotify.com/v1/users/0cxaozs3a5z8m26vwzzc80wb9/playlists
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:\Users\Cgalv\OneDrive\Desktop\Project\spotify2.py", line 23, in <module>
playlist = sp.user_playlist_create(user=sp.me()["id"], name=playlist_name, public=False)
File "C:\Users\Cgalv\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\spotipy\client.py", line 816, in user_playlist_create
return self._post("users/%s/playlists" % (user,), payload=data)
File "C:\Users\Cgalv\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\spotipy\client.py", line 326, in _post
return self._internal_call("POST", url, payload, kwargs)
File "C:\Users\Cgalv\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\spotipy\client.py", line 291, in _internal_call
raise SpotifyException(
spotipy.exceptions.SpotifyException: http status: 403, code:-1 - https://api.spotify.com/v1/users/0cxaozs3a5z8m26vwzzc80wb9/playlists:
Insufficient client scope, reason: None
I have no idea why this is happening, so i hope you can help me guys