{"id":21522048,"url":"https://github.com/kylepw/spotify-api-auth-examples","last_synced_at":"2025-04-09T22:23:01.048Z","repository":{"id":53571545,"uuid":"179226147","full_name":"kylepw/spotify-api-auth-examples","owner":"kylepw","description":"Examples of Spotify API's authentication flows using Python/Flask.","archived":false,"fork":false,"pushed_at":"2023-02-02T06:16:08.000Z","size":429,"stargazers_count":30,"open_issues_count":3,"forks_count":5,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-24T00:16:12.069Z","etag":null,"topics":["auth","authentication","authorization","flask","javascript","oauth","oauth2","python","spotify","spotify-api","spotify-web-api"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kylepw.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-04-03T06:37:39.000Z","updated_at":"2024-08-27T23:13:58.000Z","dependencies_parsed_at":"2023-02-17T15:15:34.575Z","dependency_job_id":null,"html_url":"https://github.com/kylepw/spotify-api-auth-examples","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kylepw%2Fspotify-api-auth-examples","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kylepw%2Fspotify-api-auth-examples/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kylepw%2Fspotify-api-auth-examples/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kylepw%2Fspotify-api-auth-examples/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kylepw","download_url":"https://codeload.github.com/kylepw/spotify-api-auth-examples/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248120762,"owners_count":21051010,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["auth","authentication","authorization","flask","javascript","oauth","oauth2","python","spotify","spotify-api","spotify-web-api"],"created_at":"2024-11-24T01:09:09.540Z","updated_at":"2025-04-09T22:23:01.028Z","avatar_url":"https://github.com/kylepw.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"==================================\nSpotify API Authorization Examples\n==================================\n\nThis project contains examples of Spotify API's three authorization flows using Python/Flask:\n\n- Authorization Code\n- Client Credentials\n- Implicit Grant\n\nThe *authorization code* and *implicit grant flow* examples show the\nauthorizing user's profile, token information, and a button that\nrefreshes the access token.\n\nThe *client credentials flow* example includes a search function that\nlists artist information from Spotify.\n\n.. image:: screenshots/search.png\n\t:width: 40%\n\nFor details on authorization flows, see `Spotify's Authorization Guide`__\n\n__ https://developer.spotify.com/documentation/general/guides/authorization-guide/\n\nRequirements\n------------\n- Python 3.6+\n- Docker (only if running via docker)\n\n\nRegistration\n------------\n- `Register`__ your application with ``http://127.0.0.1:5000/callback`` as the redirect URI to obtain an application key and secret.\n\n__ https://developer.spotify.com/documentation/general/guides/app-settings/#register-your-app\n\n\n\nSetup\n-----\n- Clone the repository and step inside. ::\n\n\t$ git clone https://github.com/kylepw/spotify-api-auth-examples.git\n\t$ cd spotify-api-auth-examples\n\n- Set the required environment variables: ::\n\n    $ cp env-template .env\n    $ vim .env #Replace `XXX`'s with your values in vim or another editor.\n    $ set -a; source .env; set +a\n\nUsage\n-----\n\nDocker\n~~~~~~\n\n1) Run the following command. Set ``FLOW=`` to ``auth``, ``client``, or ``implicit``: ::\n\n    $ docker --rm --env-file .env -e FLOW=client -p 5000:5000 kylepw/spotify-api-auth-examples:latest\n\n2) Access `http://127.0.0.1:5000` in a browser and click the login button.\n\nFrom source\n~~~~~~~~~~~\n\n1) Create a `virtual environment`__ (not required but **highly** recommended).\n\n2) Install required packages with `pip`__, `pipenv`__, or another package manager. ::\n\n    $ pip install -r requirements.txt #-OR- 'pipenv install' if using pipenv\n\n__ https://docs.python.org/3/tutorial/venv.html#creating-virtual-environments\n__ https://pip.pypa.io/en/stable/user_guide/#requirements-files\n__ https://pipenv.readthedocs.io/en/latest/\n\n3) Step into one of the three example folders and startup the server. ::\n\n\t$ cd authorization_code \u0026\u0026 flask run\n\t * Serving Flask app \"app.py\" (lazy loading)\n \t * Environment: development\n \t * Debug mode: on\n \t * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)\n\t ...\n\n4) Access the address listed in a browser and click the login button.\n\nLicense\n-------\n`MIT License \u003chttps://github.com/kylepw/wikiwall/blob/master/LICENSE\u003e`_\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkylepw%2Fspotify-api-auth-examples","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkylepw%2Fspotify-api-auth-examples","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkylepw%2Fspotify-api-auth-examples/lists"}