• Announcements

    • Shane D.

      2018 Evernote Webinars   01/04/2018

      To kick off the new year, we're excited to announce our  updated schedule for our series of webinars! Please check the events calendar to see which one works best for you!
    • Shane D.

      Upcoming Forum Change Announcement   02/14/2018

      Hi All! You may be seeing some changes with overall organization and layout of the discussion forums. You can learn more by going to the 'Upcoming Forum Change Announcement' in the 'Community Announcements' sub-forum!  
    • Shane D.

      Announcing 'Spaces' for Evernote Business!   02/27/2018

      Hi All, We're very excited to announce the launch of Spaces for Evernote Business! I invite you to find more details and learn more in our most recent Community Announcement! 


Recommended Posts


def parse_query_string(authorize_url):
    uargs = authorize_url.split('?')
    #vals = authorize_url.split('?')
    vals = {}
    if len(uargs) == 1:
        raise Exception('Invalid Authorization URL')
    for pair in uargs[1].split('&'):
        key, value = pair.split('=', 1)
        vals[key] = value
    return vals

url = ""
if os.environ.has_key('HTTP_HOST') and os.environ.has_key('REQUEST_URI'):
    url = "http://" + os.environ['HTTP_HOST'] + os.environ['REQUEST_URI']

vals = parse_query_string(url)

request_token = client.get_request_token(url)

access_token = client.get_access_token(request_token['oauth_token'],request_token['oauth_token_secret'],vals['oauth_verifier'])



KeyError                                  Traceback (most recent call last)
<ipython-input-117-875ccf36fc55> in <module>()
----> 1 access_token = client.get_access_token(request_token['oauth_token'],request_token['oauth_token_secret'],vals['oauth_verifier'])

/Users/yw/.pyenv/versions/anaconda2-4.3.1/lib/python2.7/site-packages/evernote-1.25.0-py2.7.egg/evernote/api/client.pyc in get_access_token(self, oauth_token, oauth_token_secret, oauth_verifier)
     65             oauth_token,
     66             oauth_token_secret,
---> 67             oauth_verifier
     68         )
     69         return access_token_dict['oauth_token']

/Users/yw/.pyenv/versions/anaconda2-4.3.1/lib/python2.7/site-packages/evernote-1.25.0-py2.7.egg/evernote/api/client.pyc in get_access_token_dict(self, oauth_token, oauth_token_secret, oauth_verifier)
     56         resp, content = client.request(self._get_endpoint('oauth'), 'POST')
     57         access_token_dict = dict(urlparse.parse_qsl(content))
---> 58         self.token = access_token_dict['oauth_token']
     59         return access_token_dict

KeyError: 'oauth_token'



Share this post

Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now