Nithin B 0 Posted February 19, 2019 Share Posted February 19, 2019 I recently started using ever-note c# API (evernote-cloud-sdk-windows) to get my notes saved into my oracle database. I have a valid production activated secret key and value. I logged in using them form my system and I revoked it from my web base ever-note account in Applications section. Now I am not able to login from only my system and able is login from other systems. Basically on first login it will ask for permission by showing a popup. But in my system it is not showing it and throwing the following error. Evernote.EDAM.Error.EDAMUserException: 'Exception of type 'Evernote.EDAM.Error.EDAMUserException' was thrown.' Error code: AUTH_ERROR Code being use: // Be sure to put your own consumer key and consumer secret here. ENSession.SetSharedSessionConsumerKey("key", "value"); if (ENSession.SharedSession.IsAuthenticated == false) { ENSession.SharedSession.AuthenticateToEvernote(); } List<ENNotebook> myNotebookList = ENSession.SharedSession.ListNotebooks(); Here ENSession.SharedSession.IsAuthenticated is true but will throw error as mentioned above when I try to fetch notebooks. I don't see any function in library that can be used to re-authenticate. If there is any way to re-authenticate? Below URL says there is a way to do it. But it doesn't help in any way because they didn't mention how to do it. https://dev.evernote.com/doc/articles/revoked_expired_auth.php Link to comment
Britalian 1 Posted January 31, 2020 Share Posted January 31, 2020 I was getting this error, too. So, I changed it to get the oAuth token and pass that to ENSession using SetSharedSessionDeveloperToken, as follows: var oAuth = new EvernoteOAuthNet.EvernoteOAuth(EvernoteOAuthNet.EvernoteOAuth.HostService.Production, "Key", "Secret", true); var errorResponse = oAuth.Authorize(); if (!errorResponse.IsNullOrEmpty()) { ENSession.SetSharedSessionDeveloperToken(oAuth.Token, oAuth.NoteStoreUrl); } That seems to work for me. 1 Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now