Announcements

Help Wizard

Step 1

NEXT STEP

Topics with Label: Python

Labels

Forum Posts

Important: App review and quota extension waiting times

The Spotify for developers platform helps many bring their ideas to life. Whether it's a short term app helping an artist’s release or something more long term - there is always a chance of success. Things start to grow and then you might also need w...

  • Moderator
  • Moderator
  • onururas
  • Visitor
  • 6546 Views
  • 41 replies
  • 11 likes
  • 6546 Views
  • 41 replies
  • 11 likes

Solved!! Invalid Client Error In Docker Container

Running into an issue with my flask application. When not running my app inside of a docker container, I'm able to successfully authorize via Spotify API.1. User navigates to localhost:5000/login2. Spotify authorization agreement is displayed3. User ...

  • Casual Listener
  • ...nvalid client'}     Below is my Dockerfile, and app.py file Dockerfile FROM python:3.9-slim-buster WORKDIR /app COPY ./requirements.txt /app RUN pip install -r requirements.txt COPY . ....
  • hi_xavier
  • Casual Listener
  • 551 Views
  • 4 replies
  • 0 likes
  • api
    Docker
    Python
  • 551 Views
  • 4 replies
  • 0 likes

Solved!! How to iterate over a playlist in reversed order?

I am writing a simple program using python and library spotipy. How can I iterate over a collection "Liked Songs" in reversed order?

  • Casual Listener
  • I am writing a simple program using python and library spotipy. How can I iterate over a collection "Liked Songs" in reversed order?
  • Ximzend
  • Roadie
  • 143 Views
  • 3 replies
  • 0 likes
  • Python
    Spotipy
  • 143 Views
  • 3 replies
  • 0 likes

Solved!! Error when trying to access user's profile

I have created an application on Spotify Dashboard that converts all my songs from the collection liked songs to a playlist using a programming language Python. Everything was fine untill yesterday, when I encountered the following issue and I do not...

  • Casual Listener
  • I have created an application on Spotify Dashboard that converts all my songs from the collection liked songs to a playlist using a programming language Python. Everything was fine untill y...
  • TumFlyG
  • Casual Listener
  • 190 Views
  • 2 replies
  • 1 likes
  • App
    Python
  • 190 Views
  • 2 replies
  • 1 likes

401 error

{'error': {'status': 401, 'message': 'Invalid access token'}}What i need to do in this sutiation ?import jsonfrom dotenv import load_dotenvimport osimport base64from requests import post, getload_dotenv()client_id = os.getenv('CLIENT_ID')client_secre...

  • Visitor
  • {'error': {'status': 401, 'message': 'Invalid access token'}} What i need to do in this sutiation ? import json from dotenv import load_dotenv import os import base64 from requests import pos...
  • Ximzend
  • Roadie
  • 156 Views
  • 1 replies
  • 0 likes
  • error401
    Possible Bug
    Python
  • 156 Views
  • 1 replies
  • 0 likes

500 Response error when creating playlist

My task is to build a program that first scraps songs from billboard.com, and then uses the Spotify API to search for these songs and create a playlist. The scrapping part and seach parts are working. The problem arises when I try to create a playlis...

  • Casual Listener
  • ....search_song() app = Application() spotify.py import base64 import requests import json class Spotify: def __init__(self): pass def create_playlist(self, year, description, public...
  • 88 Views
  • 0 replies
  • 0 likes
  • Python
    Spotify
  • 88 Views
  • 0 replies
  • 0 likes

Getting final URL with a URL that redirects using Python

The Spotify API sends you back a URL when authenticating. This URL, redirects you to a previously specified redirect URI (in my case http://localhost:5000) with some parameters that I am after. But so far I can only get to this final URL if I copy pa...

  • Casual Listener
  • ...ith python.   Obtaining the URL:         def authenticate_user(): auth_request = requests.get(ENPOINT_USER_AUTH, { 'client_id': CLIENT_ID, 'response_type': 'c...
  • 136 Views
  • 0 replies
  • 0 likes
  • Python
    Spotify
  • 136 Views
  • 0 replies
  • 0 likes

Regarding voice controlled music player

I have tried to use voice control using pycharm and connect it to spotipy api but the problem was this error is shwon HTTP Error for PUT to https://api.spotify.com/v1/me/player/play with Params: {} returned 403 due to Player command failed: Premium r...

  • Visitor
  • ...arams: {} returned 403 due to Player command failed: Premium required Traceback (most recent call last): File "C:\Users\nithi\PycharmProjects\pythonProject1\venv\Lib\site-packages\spotipy\client.py", l...
  • Ximzend
  • Roadie
  • 118 Views
  • 1 replies
  • 0 likes
  • Premium
    Python
    token_error
    Voice control
  • 118 Views
  • 1 replies
  • 0 likes

Redirect URI needed?

I just started working with Spotify's Web API and am using Python/Spotipy to retrieve data. If I want to retrieve data related specifically to my personal account (like recently played tracks or saved albums), do I need to set a redirect URI in my ap...

  • Casual Listener
  • I just started working with Spotify's Web API and am using Python/Spotipy to retrieve data. If I want to retrieve data related specifically to my personal account (like recently played tracks or s...
  • Ved18
  • Casual Listener
  • 62122 Views
  • 17 replies
  • 1 likes
  • Developer
    Python
    Uri
  • 62122 Views
  • 17 replies
  • 1 likes

Using Spotify with Python and No longer Working

PlanFree/PremiumCountryUSADevice(Dell Latitdue)Operating System(Windows 11.) My Question or IssueMay have hit the rate limit. I am using Python to pull in data for a dataset I am making for educational purposes.I have been saving the results as (so I...

  • Visitor
  • Plan Free/Premium Country USA Device (Dell Latitdue) Operating System (Windows 11.)   My Question or Issue May have hit the rate limit. I am using Python to pull in data for a d...
  • Ximzend
  • Roadie
  • 108 Views
  • 1 replies
  • 0 likes
  • API Help
    Python
  • 108 Views
  • 1 replies
  • 0 likes

Solved!! Using SPOTIPY to search for songs (tempo, key..) in Django (Is it Possible ?)

PlanFree CountrySweden CodeDjango, Bootstrap, PresSQL IDECode anywhere Operating SystemWindows 10 My Question or Issue So I am trying to use Spotipy in my school Django project. I´ve read in Django docs that external APIs is not always supported. Bef...

  • Casual Listener
  • Plan Free   Country Sweden   Code Django, Bootstrap, PresSQL   IDE Code anywhere    Operating System Windows 10   My Question or Issue   So I am tr...
  • Ximzend
  • Roadie
  • 788 Views
  • 5 replies
  • 0 likes
  • Django
    Python
    Song Key search
    Song Tempo Search
    spotify api
  • 788 Views
  • 5 replies
  • 0 likes

Solved!! retrieving genre of track in metadata

My Question or IssueI'm writing a scritpt to try to retrieve the genre from a track using the metadata of that song. I am not well versed in the spotify API, so i do need some information .btw i am writing it in Python and I'm using spotipy to access...

  • Visitor
  • ...btw i am writing it in Python and I'm using spotipy to access the API. My question would be: Is it even possible to retrieven the genre of a certian track? (bc it doesn't seem to work for me l...
  • ryzeus
  • Casual Listener
  • 1782 Views
  • 5 replies
  • 2 likes
  • API Help
    genres
    Python
    python api
  • 1782 Views
  • 5 replies
  • 2 likes

Inability to Getting Track Genre Information

(Windows 10 desktop) My Question or IssueIs there any way to get track genre information with Spotify API (python)?

  • Casual Listener
  •   (Windows 10 desktop)   My Question or Issue Is there any way to get track genre information with Spotify API (python)?
  • Ximzend
  • Roadie
  • 894 Views
  • 5 replies
  • 0 likes
  • Python
  • 894 Views
  • 5 replies
  • 0 likes

Get a permanent token for API calls

Hello, I wrote a Python script to update playlists (throught API calls). It works fine, but I have to generate a new token each hour from the Spotify Web API Console. Is there a way to get a permanent token in order to be able to use it in a schedule...

  • Casual Listener
  • Hello,   I wrote a Python script to update playlists (throught API calls). It works fine, but I have to generate a new token each hour from the Spotify Web API Console. Is there a way to get a...
  • Rémy-J
  • Casual Listener
  • 2576 Views
  • 4 replies
  • 0 likes
  • api
    Python
    token
  • 2576 Views
  • 4 replies
  • 0 likes

Fetch redirect URI?

So, in the OAuth2 thing, the user gets a URL to the OAuth2 Confirmation page. They click accept/decline, and they get redirected to the Redirect URI. How do I fetch that URI?

  • Regular
  • So, in the OAuth2 thing, the user gets a URL to the OAuth2 Confirmation page. They click accept/decline, and they get redirected to the Redirect URI. How do I fetch that URI?
  • zoltan69
  • Casual Listener
  • 1271 Views
  • 8 replies
  • 0 likes
  • api
    Help
    oAuth2
    Python
  • 1271 Views
  • 8 replies
  • 0 likes

401 error when accessing user liked/saved songs

PlanPremiumCountryUnited KingdomDeviceWindows 10 Laptop My Question or IssueWhen trying to access users liked songs via the Spotify API, I can generate an access code, however when trying to use the access code to the"https://api.spotify.com/v1/me/tr...

  • Casual Listener
  • Plan Premium Country United Kingdom Device Windows 10 Laptop     My Question or Issue When trying to access users liked songs via the Spotify API, I can generate an access code, ho...
  • Ximzend
  • Roadie
  • 333 Views
  • 1 replies
  • 0 likes
  • 401
    Python
    saved songs
  • 333 Views
  • 1 replies
  • 0 likes

Amount of shares a song has received

Hey everyone,does someone now if it is currently possible to get the amount of shares a song has received on spotify through the use of the API?So basically what I would like to know is the exact amounf of times a song got shares through the internal...

  • Newbie
  • Hey everyone, does someone now if it is currently possible to get the amount of shares a song has received on spotify through the use of the API? So basically what I would like to know is the exact...
  • 195 Views
  • 0 replies
  • 0 likes
  • api
    Instagram
    Python
    sharing
    twitter
  • 195 Views
  • 0 replies
  • 0 likes

Get the contributer of a track within a collaborative playlist.

Hello Spotify-friends,I am trying to match the tracks within a playlist to their contributer. Is there any way to do this within the API?I am using the "spotipy" module in Python, so maybe it isn't implemented there yet.Thank you for your time!Greets...

  • Casual Listener
  • Hello Spotify-friends, I am trying to match the tracks within a playlist to their contributer. Is there any way to do this within the API? I am using the "spotipy" module in Python, so maybe it i...
  • 172 Views
  • 0 replies
  • 0 likes
  • Collaborative playlist private public
    contributer
    Python
  • 172 Views
  • 0 replies
  • 0 likes

Spotify Search API doesn't return results for certain songs

PlanPremiumCountryUnited KingdomDeviceAPIOperating SystemWindows 10My Question or IssueHi, I've seen similar issues reported, but with no follow up answers so I was wondering if anyone could help with my query. I am writing a little program that sear...

  • Casual Listener
  • ...ssue where I found a certain song results in no results being returned from spotify, however on their sandbox web test [ found here ] It works just fine! Please see the results from python h...
  • tomjaimz
  • Spotify
  • 1354 Views
  • 3 replies
  • 0 likes
  • api
    Python
    Search API
    Search Track
  • 1354 Views
  • 3 replies
  • 0 likes

KeyError ['total']

I am creating a user dashboard using plotly and flask to display the top tracks and top artists preferred by a user. My code has been working fine but suddenly I got this error. Also, in the same application, I was able to create a new playlist on sp...

bleh.png
  • Newbie
  • I am creating a user dashboard using plotly and flask to display the top tracks and top artists preferred by a user. My code has been working fine but suddenly I got this error. Also, in the same app...
  • 835 Views
  • 0 replies
  • 0 likes
  • flask
    Python
    Spotify
  • 835 Views
  • 0 replies
  • 0 likes

Solved!!Superuser Contribution Invalid username - cant get devices

HiI'm trying get Spotify devices (and eventually set active device) via the web API. I can retrieve track info, but as soon I try to access device or play/pause I get the "Invalid User" reply.I can see the necesary scopes in the Auth token reply, but...

  • Visitor
  • Hi I'm trying get Spotify devices (and eventually set active device) via the web API. I can retrieve track info, but as soon I try to access device or play/pause I get the "Invalid User" reply....
  • spotifyjosh
  • Spotify
  • 5349 Views
  • 1 replies
  • 0 likes
  • api
    devices
    Python
  • 5349 Views
  • 1 replies
  • 0 likes