Session::__construct($clientId, $clientSecret, $redirectUri, $request)
Constructor Set up client credentials.
* `$clientId` **string** - The client ID.
* `$clientSecret` **string** - Optional. The client secret.
* `$redirectUri` **string** - Optional. The redirect URI.
* `$request` **\SpotifyWebAPI\Request** - Optional. The Request object to use.
Session::generateCodeChallenge($codeVerifier, $hashAlgo)
Generate a code challenge from a code verifier for use with the PKCE flow.
* `$codeVerifier` **string** - The code verifier to create a challenge from.
* `$hashAlgo` **string** - Optional. The hash algorithm to use. Defaults to "sha256".
Session::generateCodeVerifier($length)
Generate a code verifier for use with the PKCE flow.
* `$length` **int** - Optional. Code verifier length. Must be between 43 and 128 characters long, default is 128.
Session::generateState($length)
Generate a random state value.
* `$length` **int** - Optional. Length of the state. Default is 16 characters.
Session::getAuthorizeUrl($options)
Get the authorization URL.
* `$options` **array\|object** - Optional. Options for the authorization URL.
Session::getAccessToken()
Get the access token.
Session::getClientId()
Get the client ID.
Session::getClientSecret()
Get the client secret.
Session::getTokenExpiration()
Get the access token expiration time.
Session::getRedirectUri()
Get the client's redirect URI.
Session::getRefreshToken()
Get the refresh token.
Session::getScope()
Get the scope for the current access token
Session::refreshAccessToken($refreshToken)
Refresh an access token.
* `$refreshToken` **string** - Optional. The refresh token to use.
Session::requestAccessToken($authorizationCode, $codeVerifier)
Request an access token given an authorization code.
* `$authorizationCode` **string** - The authorization code from Spotify.
* `$codeVerifier` **string** - Optional. A previously generated code verifier. Will assume a PKCE flow if passed.
Session::requestCredentialsToken()
Request an access token using the Client Credentials Flow.
Session::setAccessToken($accessToken)
Set the access token.
* `$accessToken` **string** - The access token
Session::setClientId($clientId)
Set the client ID.
* `$clientId` **string** - The client ID.
Session::setClientSecret($clientSecret)
Set the client secret.
* `$clientSecret` **string** - The client secret.
Session::setRedirectUri($redirectUri)
Set the client's redirect URI.
* `$redirectUri` **string** - The redirect URI.
Session::setRefreshToken($refreshToken)
Set the session's refresh token.
* `$refreshToken` **string** - The refresh token.
How can I help you explore Laravel packages today?