Spotify Auth and Replies
New Features
Spotify Authentication
This PR finally implements the entire spotify oauth process using the Authorization Code method. It requires that you set three environment variables
export SPOTIFY_AUTH={{your spotify authorization code}}
export SPOTIFY_CLIENT_ID={{your spotify client id}}
export SPOTIFY_CLIENT_SECRET={{your spotify client secret}}
The processes uses these variables in a request sent to spotify which returns an access_token and a refresh_token. The access_token is used on subsequent requests to get information from the spotify API, while the refresh_token is used after 60 minutes to generate a new access_token.
Once we have access to spotify, we can search for songs and manipulate playlists. This lets us add songs directly to the weekly playlist, and keep track of who chooses what song. Replies are parsed and used to search spotify's database for the track. If found, the bot will reply and add that song to the weekly playlist, automating much of the process.
Now Playing

Check out the #nowplaying community and bot in action here
Posted on Utopian.io - Rewarding Open Source Contributors

Thank you for the contribution. It has been approved.
You can contact us on Discord.
[utopian-moderator]
Hey @amosbastian, I just gave you a tip for your hard work on moderation. Upvote this comment to support the utopian moderators and increase your future rewards!
Hey @walnut1 I am @utopian-io. I have just upvoted you!
Achievements
Community-Driven Witness!
I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!
Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x