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

Get Auth without django #96

Open
ibereranieri opened this issue Apr 17, 2024 · 0 comments
Open

Get Auth without django #96

ibereranieri opened this issue Apr 17, 2024 · 0 comments

Comments

@ibereranieri
Copy link

For those are trying to generates the verified token without django. This is the way.
This is by far not the best solution but is working for my personal issues

import webbrowser

sandbox=False
china=False
client = EvernoteClient(consumer_key=<CONSUMER_KEY>,
consumer_secret=<CONSUMER_SECRET>,
sandbox=sandbox,china=china
)
request_token=client.get_request_token('http://localhost')
authorize_url=client.get_authorize_url(request_token)
webbrowser.open(authorize_url)

#This will open the verification window for your app on Evernote (set for the time you desire)

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

#Look for the new access token on the generated url
print("Access Token:", access_token)

#now you can use this new access_token on your projects

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

1 participant