Skip to content

Genius API Setup

Alexander Christensen edited this page Aug 9, 2023 · 1 revision
  1. Sign up and login to Genius: https://genius.com/signup_or_login

  2. Once logged in, head over to the API: https://genius.com/api-clients

  3. Click on "New API Client" on the left sidebar (highlighted in yellow)

  1. Enter in text for "APP NAME". The name doesn't matter but some text is required

  2. Enter a valid website address for "APP WEBSITE URL". The website doesn't have to be real but the format needs to be proper

  3. "ICON URL" and "REDIRECT URI" can be left blank

  1. Click "Save"

  2. You've now set up an API client. You can get your token by clicking "Generate Your Token" (highlighted in yellow)

  1. Copy your token

  2. In R, use the following code:

# Store GENIUS token
Sys.setenv(
  GENIUS_API_TOKEN = "PASTE_YOUR_TOKEN_HERE"
)
  1. Paste your token between the quotes. Keep the quotes

  2. You should be good to go! Try it out:

get_lyrics(
  artist_name = "AC/DC",
  song_names = "For Those About to Rock (We Salute You)"
)

To keep rocking on, you'll need to generate new tokens from time to time. You can use the link output when loading {simpleRgenius} to come here and get set up again (you'll only need to generate a new token)

Clone this wiki locally