mirror of
https://github.com/c0de-archive/spotipy-experiments.git
synced 2024-11-16 13:37:27 +00:00
7757235dbb
Here I learned how to authenticate my app over env, as well as trigger an oauth login for the username specified I created a small script that will write the now playing track info to a file This is useful for keeping track of the song that is playing at all times
18 lines
624 B
Bash
18 lines
624 B
Bash
#!/bin/bash
|
|
|
|
# Client ID and Secret can be found at:
|
|
# https://beta.developer.spotify.com/dashboard/applications/
|
|
|
|
# Activate Python Virtualenv
|
|
# Ensure that you have previously set this up with `virtualenv venv`
|
|
# Select only one of the below
|
|
source venv/bin/activate # For Linux/macOS/*nix Users
|
|
# source venv/Scripts/activate # For Windows Users
|
|
|
|
# API Auth Stuffs
|
|
export SPOTIPY_CLIENT_ID='YOUR_CLIENT_ID_HERE'
|
|
export SPOTIPY_CLIENT_SECRET='YOUR_CLIENT_SECRET_HERE'
|
|
# Response from Spotify API after authorization
|
|
# Not sure if this actually requires a local web server
|
|
export SPOTIPY_REDIRECT_URI='http://localhost/'
|