mirror of
https://github.com/spotipy-dev/spotipy.git
synced 2026-04-27 00:25:54 +03:00
[GH-ISSUE #523] Python how to play songs without redirect uri (only using IDLE) #314
Labels
No labels
api-bug
bug
dependencies
documentation
duplicate
enhancement
external-ide
headless-mode
implicit-grant-flow
invalid
missing-endpoint
pr-welcome
private-api
pull-request
question
spotipy3
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/spotipy#314
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Raj-Dave368 on GitHub (Jun 30, 2020).
Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/523
This is my Code:
import spotipy
from spotipy.oauth2 import SpotifyOAuth
from pprint import pprint
from time import sleep
scope = "user-read-playback-state,user-modify-playback-state"
sp = spotipy.Spotify(client_credentials_manager=SpotifyOAuth(scope=scope))
res = sp.devices()
pprint(res)
sp.start_playback(uris=['spotify:track:6gdLoMygLsgktydTQ71b15'])
sp.volume(100)
sleep(2)
sp.volume(50)
sleep(2)
sp.volume(100)
I just want to play this song in my device using only python IDLE
how can i do it
If I specify localhost as a redirect uri then i got error that "specify some port"
if i specify port then i got error that is "code is not provided"
spotipy.oauth2.SpotifyOauthError: error: invalid_request, error_description: code must be supplied
what should i do
@stephanebruckert commented on GitHub (Jul 5, 2020):
Does IDLE open your web browser at any point?
@Raj-Dave368 commented on GitHub (Jul 13, 2020):
Yes for sure, i have enter passwords but after that console produces an error
@Raj-Dave368 commented on GitHub (Oct 8, 2020):
I was a beginner and was doing the wrong things, there was no issue.