get_spotify_authorization_code: Get Spotify Authorization Code

Description Usage Arguments Details Value Examples

View source: R/spotifyr-functions.R

Description

This function is copied verbatim from the spotifyr package by Charlie Thompson. It is being used in accordance with its MIT License. All copyright is retained by C Thompson as follows YEAR: 2017 COPYRIGHT HOLDER: Charlie Thompson

Usage

1
2
3
4
5
get_spotify_authorization_code(
  client_id = Sys.getenv("SPOTIFY_CLIENT_ID"),
  client_secret = Sys.getenv("SPOTIFY_CLIENT_SECRET"),
  scope = get_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

Details

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

Value

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

Examples

1
2
3
4
## Not run: 
authorization <- get_spotify_authorization_code()

## End(Not run)

condwanaland/spotty documentation built on Dec. 19, 2021, 6:01 p.m.