From 37b6b5fd805d4a7fa7b0379a680f24628a6d0484 Mon Sep 17 00:00:00 2001 From: Stephane Bruckert Date: Thu, 12 Mar 2020 00:53:36 +0000 Subject: [PATCH] Add multiple accounts example, solves #446 --- examples/multiple_accounts.py | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 examples/multiple_accounts.py diff --git a/examples/multiple_accounts.py b/examples/multiple_accounts.py new file mode 100644 index 0000000..92347d3 --- /dev/null +++ b/examples/multiple_accounts.py @@ -0,0 +1,10 @@ +import spotipy +import spotipy.util as util + +from pprint import pprint + +while True: + username = input("Type the Spotify user ID to use: ") + token = util.prompt_for_user_token(username, show_dialog=True) + sp = spotipy.Spotify(token) + pprint(sp.me()) \ No newline at end of file