get-auth-code.pyon commit initial commit (ba0b94f)
   1#! /bin/python
   2
   3import webbrowser, os
   4
   5id = input('Enter client id: ');
   6secret = input('Enter client secret: ');
   7callback = input('Enter callback url: ');
   8scopes = input('Enter space-separated scopes: ');
   9
  10webbrowser.get().open("https://accounts.spotify.com/authorize/client_id=" + id + "&response_type=code&redirect_uri=" + callback + "&scope=" + scopes);
  11
  12print('A browser window has been opened asking you to log in to Spotify. Once logged in, you will be redirected to the callback uri you gave, with a parameter containing the auth code.')