spotifyClientPkceApi

fun spotifyClientPkceApi(clientId: String?, redirectUri: String?, authorization: SpotifyUserAuthorization, block: SpotifyApiOptions.() -> Unit = {}): SpotifyClientApiBuilder(source)

Instantiate a new SpotifyClientApiBuilder. This is for PKCE authorization.

Use case: I am using the PKCE client authorization flow.

Return

Configurable SpotifyClientApiBuilder that, when built, creates a new SpotifyClientApi

Parameters

clientId

Spotify client id

redirectUri

Spotify redirect uri

authorization

A SpotifyUserAuthorization that must contain one of the following: authorization code (preferred), access token string (tokenString), Token object, and that may contain a refresh token (preferred) with which to refresh the access token. Retrieved after PKCE client authorization flow. **You must provide a code verifier (plaintext).

block

Override default API options such as the cache limit


fun spotifyClientPkceApi(clientId: String?, redirectUri: String?, authorizationCode: String, pkceCodeVerifier: String): SpotifyClientApiBuilder(source)

Instantiate a new SpotifyClientApiBuilder. This is for PKCE authorization.

Use case: I am using the PKCE client authorization flow.

Return

Configurable SpotifyClientApiBuilder that, when built, creates a new SpotifyClientApi

Parameters

clientId

Spotify client id

redirectUri

Spotify redirect uri

pkceCodeVerifier

The code verifier generated that the client authenticated with (using its code challenge)

authorizationCode

Only available when building SpotifyClientApi. Spotify auth code


fun spotifyClientPkceApi(clientId: String?, redirectUri: String?, authorizationCode: String, pkceCodeVerifier: String, block: SpotifyApiOptions.() -> Unit): SpotifyClientApiBuilder(source)

Instantiate a new SpotifyClientApiBuilder. This is for PKCE authorization.

Use case: I am using the PKCE client authorization flow.

Return

Configurable SpotifyClientApiBuilder that, when built, creates a new SpotifyClientApi

Parameters

clientId

Spotify client id

redirectUri

Spotify redirect uri

pkceCodeVerifier

The code verifier generated that the client authenticated with (using its code challenge)

authorizationCode

Only available when building SpotifyClientApi. Spotify auth code

block

Override default API options such as the cache limit


fun spotifyClientPkceApi(clientId: String?, redirectUri: String?, token: Token, block: SpotifyApiOptions.() -> Unit = {}): SpotifyClientApiBuilder(source)

Instantiate a new SpotifyClientApiBuilder. This is for PKCE authorization.

Use case: I am using the PKCE client authorization flow.

Return

Configurable SpotifyClientApiBuilder that, when built, creates a new SpotifyClientApi

Parameters

clientId

Spotify client id

redirectUri

Spotify redirect uri

token

Build the API using an existing token.

block

Override default API options such as the cache limit