get_spotify_authorization_code: Get Spotify Authorization Code

View source: R/authenticate.R

get_spotify_authorization_codeR Documentation

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()
)

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

Value

The Spotify Web API Token2.0 reference class object (see httr::oauth2.0_token), or an error message.

See Also

Other authentication functions: get_spotify_access_token()

Examples

## Not run: 
authorization <- get_spotify_authorization_code()

## End(Not run)

spotifyr documentation built on Oct. 30, 2024, 9:13 a.m.