title: OAuth process with Evernote fails with "Oops, we encountered an error"
body: <p>After investing some days in experiments I need to ask for assistance here.</p>
  <p>I used a devToken to write and try my code and want to change to production now. As I see, production requires to use OAuth instead and doesn't allow a devToken, even not for personal use. So I try to implement an OAuth, but fail at get_access_token() as Evernotes side returns the error &quot;Oops, we encountered an error&quot; instead the oauth_token.</p>
  <p>The difficulty for me is to decide whether it is on me or on Evernote. Can anyone give me a hint?</p>
  <p>My code is the following: (based on <a href="https://gist.github.com/brettkelly/5041037" rel="nofollow noreferrer">https://gist.github.com/brettkelly/5041037</a>)</p>
  <pre><code># Python OAuth example
  from evernote.api.client import EvernoteClient
  
  
  ##
  # Helper function to turn query string parameters into a
  # Python dictionary
  ##
  def parse_query_string(authorize_url):
      uargs = authorize_url.split('?')
      vals = {}
  
      if len(uargs) == 1:
          raise Exception('Invalid Authorization URL')
      for pair in uargs[1].split('&amp;'):
          key, value = pair.split('=', 1)
          vals[key] = value
      return vals
  
  
  ##
  # Create an instance of EvernoteClient using your API
  # key (consumer key and consumer secret)
  ##
  client = EvernoteClient(
      consumer_key='xxxx',
      consumer_secret='yyyy',
      sandbox=True)
  
  request_token = client.get_request_token('http://localhost')
  
  print(&quot;Paste this URL in your browser and login&quot;)
  print('\t'+client.get_authorize_url(request_token))
  print('-------')
  
  after_accept_url = 'http://localhost/?oauth_token=1111&amp;oauth_verifier=2222&amp;sandbox_lnb=false'
  vals = parse_query_string(after_accept_url)
  
  print(f&quot;Auth Token: {request_token['oauth_token']}&quot;)
  print(f&quot;Auth Secret: {request_token['oauth_token_secret']}&quot;)
  print(f&quot;OAuth verifier: {vals['oauth_verifier']}&quot;)
  
  auth_token = client.get_access_token(
      request_token['oauth_token'],
      request_token['oauth_token_secret'],
      vals['oauth_verifier']
  )
  
  # Create a new client using the auth token
  client = EvernoteClient(token=auth_token)
  userStore = client.get_user_store()
  user = userStore.getUser()
  print(user.username)
  </code></pre>