Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto-refresh AuthCode flow token. #435

Merged
merged 17 commits into from Feb 10, 2020
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
19 changes: 19 additions & 0 deletions examples/simple4.py
@@ -0,0 +1,19 @@
import spotipy
import os
from pprint import pprint


def main():
auth_manager = spotipy.SpotifyOAuth(
client_id=os.getenv("SPOTIPY_CLIENT_ID"),
client_secret=os.getenv("SPOTIPY_CLIENT_SECRET"),
redirect_uri=os.getenv("SPOTIPY_REDIRECT_URI"),
username=os.getenv("SPOTIPY_CLIENT_USERNAME"),
stefanondisponibile marked this conversation as resolved.
Show resolved Hide resolved
)
spotify = spotipy.Spotify(auth_manager=auth_manager)
me = spotify.me()
pprint(me)


if __name__ == "__main__":
main()