spotifywebapipython.spotifyauthtoken
Spotify Authorization Token class.
Initializes a new instance of the class.
Arguments:
- authorizationType (str): Authorization type chosen when this token was generated.
- profileId (str): Profile identifier used when loading / storing the token to disk.
- root (dict): Spotify Web API JSON response in dictionary format, used to load object attributes; otherwise, None to not load attributes.
An access token that can be provided in subsequent calls to Spotify Web API services.
Authorization type chosen when this token was generated.
It will be one of the following values:
- "Authorization Code".
- "Authorization Code with PKCE".
- "Client Credentials".
- "Implicit Grant".
DateTime (in UTC format) that the authorization token was created.
DateTime (in UTC format) that the authorization token will expire.
Returns a string containing the header key to assign the authorization token value to. This will always return 'Authorization'.
Returns the value portion of the authorization header, in the form of '{tokentype} {token}'.
Example: `Bearer {token value ...}'
The refresh token returned from the authorization token request.
This is only set when using the "Authorization code" or "Authorization code with PKCE" authorization types.
There will be no refresh token for the "Client Credentials" or "Impllicit Grant" authorization types.
A space-separated list of scopes which have been granted for the AccessToken
.
If no scopes are specified, authorization will be granted only to access publicly available information: that is, only information normally visible in the Spotify desktop, web, and mobile players.
Scopes can only be used with the "Authorization Code", "Authorization Code with PKCE", and "Implicit Grant" authorization types.
Scopes cannot be used with the "Client Credentials" authorization type.