Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Addition to documentation: Auth Tokens #2

Open
sampaio96 opened this issue Mar 9, 2022 · 2 comments
Open

Addition to documentation: Auth Tokens #2

sampaio96 opened this issue Mar 9, 2022 · 2 comments

Comments

@sampaio96
Copy link

As you might know, Evernote doesn't support Dev Tokens anymore. Getting my AuthToken was easy after I got my API Key. (Got it here, with Basic access for safety, and it took 2 days.)
I just ran the Django sample in the Evernote Python 2 SDK. You may want to add that suggestion to the Readme.
More details: On a separate environment, clone the repository in the link. Then follow the instructions for Django with OAuth, and simply change the file sample/django/oauth/views.py to print your AuthToken to the terminal:

Before:

try:
        client = get_evernote_client()
        client.get_access_token(
            request.session['oauth_token'],
            request.session['oauth_token_secret'],
            request.GET.get('oauth_verifier', '')
        )

After:

try:
        client = get_evernote_client()
        auth_token = client.get_access_token(
            request.session['oauth_token'],
            request.session['oauth_token_secret'],
            request.GET.get('oauth_verifier', '')
        )
        print(auth_token)
@ahmadjubair33
Copy link

Hi, @sampaio96 I want to solve this issue Can you please tell me what should I change because I did not find this sample/django/oauth/views.py file

@sampaio96
Copy link
Author

Hi, @ahmadjubair33. This isn't as much an issue as it is a tip.
Are you using everlink, or are you trying to generate an Auth Token to use with your own personal account on Evernote? The readme on everlink does not provide guidance on how to generate the Auth Token, and the online documentation is a bit confusing on the topic of production API keys. That's why I added that you can use the sample code in https://github.com/evernote/evernote-sdk-python.
Note that this SDK uses Python 2.X, so it isn't the same SDK used in the everlink project. You should create a separate environment to run the sample and get your Auth Key.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants