Search code examples
pythonlinuxpython-2.7oauthevernote

getUser return EDAMSystemException errorCode=8


I'm trying to get my account information by evernote api on python, however, I got errors :

Traceback (most recent call last): File "", line 1, in

File "build/bdist.linux-x86_64/egg/evernote/api/client.py", line 148, in delegate_method

File "build/bdist.linux-x86_64/egg/evernote/edam/userstore/UserStore.py", line 1033, in getUser

File "build/bdist.linux-x86_64/egg/evernote/edam/userstore/UserStore.py", line 1058, in recv_getUser

evernote.edam.error.ttypes.EDAMSystemException: EDAMSystemException(errorCode=8, rateLimitDuration=None, _message='authenticationToken')

My python code as below:

from evernote.api.client import EvernoteClient
dev_token="my develop token"
client = EvernoteClient(token=dev_token)
userStore = client.get_user_store()
user = userStore.getUser()

I'm sure I've generated a valid developer token for my Evernote account, as shown in the picture, I have a develop token in my account link

Is there anything I missed?

By the way, I use the code above and replace the key with another develop token generated by Evernote sandbox account, it's ok.


Solution

  • If you are not on sandbox, try:

    client = EvernoteClient(token=dev_token, sandbox=False)