cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results for 
Search instead for 
Did you mean: 

spotify API get token - raw_input was called, but this frontend does not support input requests.

AlexSantiago
New Contributor II

hello everyone, I'm trying use spotify's api to analyse my music data, but i'm receiving a error during authentication, specifically when I try get the token, above my code.

Is it a databricks bug?

pip install spotipy

from spotipy.oauth2 import SpotifyOAuth

from spotipy.oauth2 import SpotifyClientCredentials

import spotipy

import spotipy.util as util

sp = spotipy.oauth2.SpotifyOAuth(client_id='client_id

                ,client_secret='client_secret

                ,redirect_uri='http://localhost:8080/callback/'

                ,requests_timeout=5, open_browser=False)

sp.get_access_token()

error:

StdinNotImplementedError: raw_input was called, but this frontend does not support input requests.

6 REPLIES 6

PriyaAnanthram
Contributor III

The redirect uri seems to point to localhost?

That doesnt seem right

Anonymous
Not applicable

Hi @Alex Santos Santiago​ 

Hope all is well! Just wanted to check in if you were able to resolve your issue and would you be happy to share the solution or mark an answer as best? Else please let us know if you need more help. 

We'd love to hear from you.

Thanks!

bettyejallen
New Contributor II

Hello Everyone,

It sounds like you're encountering an issue with user input during the authentication process with Spotify's API. The error "raw_input was called, but this frontend does not support input requests" often indicates that the environment you're using doesn't support interactive input, which is common in environments like Databricks. To resolve this, you might need to modify your authentication flow to use non-interactive methods, such as setting environment variables or using a different authentication library. For an alternative approach, I recommend looking into Jailbreak Spotify, which can provide streamlined methods for accessing Spotify's API without these interactive input challenges....Grateful!

Best of Luck!!

SabtainSaleem
New Contributor II

When working with the Spotify API and dealing with authentication issues, especially around token generation, it's important to ensure you're following the correct OAuth flow. Double-check your backend setup for token handling and make sure the raw input call matches the expected format. If you're looking for additional ways to access Spotify, you might also explore Spotify Premium PC, which can be found here.

SabtainSaleem

ElveraBotsford
New Contributor II

Thanks for all

Scofeild618
New Contributor

When using the Spotify API and encountering authentication issues, particularly with token generation, it's crucial to follow the correct OAuth flow. Verify that your backend is properly set up for token handling and ensure that the raw input call adheres to the expected format. Additionally, if you’re seeking alternative ways to access Spotify, consider exploring Spotify Premium for PC, which you can find here.

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you won’t want to miss the chance to attend and share knowledge.

If there isn’t a group near you, start one and help create a community that brings people together.

Request a New Group