This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const client_id = "YOUR_CLIENT_ID" | |
const client_secret = "YOUR_CLIENT_SECRET" | |
const refresh_token = "YOUR_REFRESH_TOKEN" | |
const basic = Buffer.from(`${client_id}:${client_secret}`).toString('base64') | |
const TOKEN_ENDPOINT = `https://accounts.spotify.com/api/token` | |
const getAccessToken = async () => { | |
const response = await fetch(TOKEN_ENDPOINT, { |