Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def spotify_connect(client_id, client_secret):
"""
Connect to Spotify API.
"""
creds = util.oauth2.SpotifyClientCredentials(client_id, client_secret)
token = creds.get_access_token()
return Spotify(auth=token)