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.

7 REPLIES 7

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 II

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.

e4rtgdeter
New Contributor II

It sounds like you're encountering an issue with user input during the authentication process with Spotify Lite Mod 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.

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