import tekore as tk

cfg = {k: input(f"Input {k}: ").strip() for k in ('client_id', 'client_secret', 'redirect_uri')}
cred = tk.RefreshingCredentials(*cfg.values())

print('Open in browser for Spotify login:')
print(cred.user_authorisation_url(tk.scope.every))

redirected = input('Please paste redirect URL: ').strip()
code = tk.parse_code_from_url(redirected)

print('\n', cred.request_user_token(code), sep='')

f8dd9f14135e990e63aa35fff15586e43cb3e185
<mask token>

<mask token>
print('Open in browser for Spotify login:')
print(cred.user_authorisation_url(tk.scope.every))
<mask token>
print('\n', cred.request_user_token(code), sep='')

<mask token>
cfg = {k: input(f'Input {k}: ').strip() for k in ('client_id',
    'client_secret', 'redirect_uri')}
cred = tk.RefreshingCredentials(*cfg.values())
print('Open in browser for Spotify login:')
print(cred.user_authorisation_url(tk.scope.every))
redirected = input('Please paste redirect URL: ').strip()
code = tk.parse_code_from_url(redirected)
print('\n', cred.request_user_token(code), sep='')

import tekore as tk
cfg = {k: input(f'Input {k}: ').strip() for k in ('client_id',
    'client_secret', 'redirect_uri')}
cred = tk.RefreshingCredentials(*cfg.values())
print('Open in browser for Spotify login:')
print(cred.user_authorisation_url(tk.scope.every))
redirected = input('Please paste redirect URL: ').strip()
code = tk.parse_code_from_url(redirected)
print('\n', cred.request_user_token(code), sep='')

import tekore as tk

cfg = {k: input(f"Input {k}: ").strip() for k in ('client_id', 'client_secret', 'redirect_uri')}
cred = tk.RefreshingCredentials(*cfg.values())

print('Open in browser for Spotify login:')
print(cred.user_authorisation_url(tk.scope.every))

redirected = input('Please paste redirect URL: ').strip()
code = tk.parse_code_from_url(redirected)

print('\n', cred.request_user_token(code), sep='')
