title: Spotify Client Credential Flow
body: <p>Spotify recently updated their API conditions with the requirement that every request have authentication, which is fine, but when trying to set that up on the front-end I got the 'Access-Control-Allow-Origin' issue posted here: <a href="https://stackoverflow.com/questions/28389699/access-control-allow-origin-denied-spotify-api">Access-Control-Allow-Origin denied spotify api</a> because I was trying to do it through AJAX. My app does not require any personal spotify information, just pulling down preview URLs and track information from spotify, so I'd prefer if users didn't have to log in to use it. If I was going to implement Client Credential flow on the backend, where would I start? My app is a Django backend with JavaScript/React on the frontend. My main concern is that anywhere where I put the code to get myself a token has to come from the server side, but also be run every ~hour as the tokens expire. Any help is welcome, I can post code if necessary! </p>