Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

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

Arguments

client_id

Defaults to System Envioronment variable "SPOTIFY_CLIENT_ID"

client_secret

Defaults to System Envioronment 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

authorization <- get_spotify_authorization_code()

spotifyr

R Wrapper for the 'Spotify' Web API

v2.2.1
MIT + file LICENSE
Authors
Charlie Thompson [aut], Daniel Antal [aut, cre] (<https://orcid.org/0000-0001-7513-6760>), Josiah Parry [aut] (<https://orcid.org/0000-0001-9910-865X>), Donal Phipps [aut], Tom Wolff [aut]
Initial release
2021-06-09

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.