Spotify Discover Weekly Archiver
AWS lambda function to archive your Spotify Discover Weekly playlist. Built using python-lambda.
Setup
(Requires Python 3.6+)
-
Set up a local development environment:
pip install pipenv # If you don't already have Pipenv installed pipenv install
-
Create a Spotify API application:
- Log in to the Spotify developer dashboard and create an application.
- In the application page, click Edit Settings, add http://localhost:5000/callback as a redirect URI, and click Save at the bottom of the pop-up.
-
Get an access token and secret access key for AWS and make sure that the associated IAM user has lambda access. TODO: exact permissions needed?
-
Create a
.env
file with your AWS and Spotify credentials:cp template.env .env
- Set the AWS credentials and Spotify client ID and client secret in
.env
-
Get a refresh token for your Spotify account (after running this command, you will need to sign into Spotify in your browser, upon which a refresh token will be added to your
.env
so that the Spotify API application you made can access your Spotify account.
pipenv run get_refresh_token.py
- Deploy! TODO: how?