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

get_spotify_access_token

Get Spotify Access Token


Description

This function creates a Spotify access token.

Usage

get_spotify_access_token(
  client_id = Sys.getenv("SPOTIFY_CLIENT_ID"),
  client_secret = Sys.getenv("SPOTIFY_CLIENT_SECRET")
)

Arguments

client_id

Defaults to System Environment variable "SPOTIFY_CLIENT_ID"

client_secret

Defaults to System Environment variable "SPOTIFY_CLIENT_SECRET"

Value

The Spotify Access Token of the current user or a meaningful error message.

See Also

Other authentication functions: get_spotify_authorization_code()

Examples

token <- get_spotify_access_token()

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.