getSpotifyPkceAuthorizationUrl

fun getSpotifyPkceAuthorizationUrl(vararg scopes: SpotifyScope, clientId: String, redirectUri: String, codeChallenge: String, state: String? = null): String(source)

Get the PKCE authorization url for the provided clientId and redirectUri application settings, when attempting to authorize with specified scopes

Parameters

scopes

Spotify scopes the api instance should be able to access for the user

clientId

Spotify client id

redirectUri

Spotify redirect uri

state

This provides protection against attacks such as cross-site request forgery.

codeChallenge

In order to generate the code challenge, your app should hash the code verifier using the SHA256 algorithm. Then, base64url encode the hash that you generated.