spotifyr (version 2.2.4)

get_spotify_authorization_code: Get Spotify Authorization Code

Description

This function creates a Spotify authorization code. See httr::oauth2.0_token.

Usage

get_spotify_authorization_code(
  client_id = Sys.getenv("SPOTIFY_CLIENT_ID"),
  client_secret = Sys.getenv("SPOTIFY_CLIENT_SECRET"),
  scope = scopes()
)

Value

The Spotify Web API Token2.0 reference class object (see

httr::oauth2.0_token), or an error message.

Arguments

client_id

Defaults to System Environment variable "SPOTIFY_CLIENT_ID"

client_secret

Defaults to System Environment variable "SPOTIFY_CLIENT_SECRET"

scope

Space delimited string of spotify scopes, found here: https://developer.spotify.com/documentation/general/guides/scopes/. All scopes are selected by default

See Also

Other authentication functions: get_spotify_access_token()

Examples

Run this code
if (FALSE) {
authorization <- get_spotify_authorization_code()
}

Run the code above in your browser using DataLab