title: Connecting to the spotify API with spotipy
body: <p>so I'm curious if anyone has ever done this before and can give me a code snippet. Connecting to this is so troublesome. </p>
  
  <pre><code>self.username=name
          token = spotipy.util.prompt_for_user_token(self.username,client_id=my_id, client_secret=my_secret)
  
          self.sp = spotipy.Spotify(auth=token)
  </code></pre>
  
  <p>I then run my code as followed </p>
  
  <pre><code>python spotifybot.py
  
  
              User authentication requires interaction with your
              web browser. Once you enter your credentials and
              give authorization, you will be redirected to
              a url.  Paste that url you were directed to to
              complete the authorization.
  
  
  Please navigate here: 
  
  
  Enter the URL you were redirected to:
  </code></pre>
  
  <p>I go to the url and its an error page, I have no idea how to get past this. Ussually when connecting to API in the past you just need your name, pw and the keys.  Can someone give me some tips to just connect to the api. I know what to do after that.</p>