Skip to content

Instantly share code, notes, and snippets.

View herrlax's full-sized avatar
💭
🍰

herrlax

💭
🍰
  • Stockholm
View GitHub Profile
@donstefani
donstefani / spotify-axios-basic-auth.js
Created March 8, 2020 22:44
Getting an access token for a React app from the Spotify API using Node.js and Axios
import axios from 'axios';
import qs from 'qs';
export const getAuth = async () => {
const clientId = process.env.REACT_APP_BASIC_CLIENT_ID;
const clientSecret = process.env.REACT_APP_BASIC_CLIENT_SECRET;
const headers = {
headers: {
Accept: 'application/json',