spotifylib package¶
Submodules¶
spotifylib.spotifylib module¶
This module makes use of Spotipy’s methods but modifying the authentication in a simple and transparent way from the user without any need of 3rd party application to follow the OAuth flow as mentioned in the following documentation page.
https://developer.spotify.com/web-api/authorization-guide/#authorization_code_flow
-
class
spotifylib.spotifylib.
Spotify
[source]¶ Bases:
object
Library’s interface object
Instantiates the authentication object to figure out the token and passes it alongside the session to Spotipy’s in order to use its methods.
-
class
spotifylib.spotifylib.
SpotifyAuthenticator
(client_id, client_secret, username, password, callback, scope)[source]¶ Bases:
object
Authenticator object
This object handles authentication for all requests. In order to retrieve all values for this to work, one has to create a new application under his/her account.
https://developer.spotify.com/my-applications/#!/applications
-
token
¶
-
spotifylib.spotifylibexceptions module¶
Main module Exceptions file
Put your exception classes here
-
exception
spotifylib.spotifylibexceptions.
SpotifyError
[source]¶ Bases:
exceptions.Exception
Generic error handler while interacting with Spotify API
These errors appear when trying to get access grants and we get a
400
Error- Wrong client_id
'INVALID_CLIENT: Invalid client'
- Wrong response_type
'response_type must be code or token'
- Invalid scope
'INVALID_SCOPE: Invalid scope'
- Invalid CSRF cookie
'{"error":"errorCSRF"}'
- Invalid redirect_uri
'Illegal redirect_uri'