anki-adder-plus icon indicating copy to clipboard operation
anki-adder-plus copied to clipboard

Couldn't log onto AnkiWeb.

Open yosevu opened this issue 8 years ago • 11 comments

Hello,

I'm trying to setup, but my email/password won't save. I have double-checked and verified they work signing into ankiweb.net. Is there something I am missing?

Thanks!

yosevu avatar Jan 20 '17 18:01 yosevu

@luzhanov login request body doesn't contain csrf_token ( I just compare request on ankiweb and from addon )

Suppose that before $.post for login we should make get request and parse CSRF token from response

is PR welcome?

vvscode avatar Jan 22 '17 11:01 vvscode

https://github.com/luzhanov/anki-adder-plus/pull/8

vvscode avatar Jan 22 '17 11:01 vvscode

Beside login, csrf_token was also requested while saving. But it doesn't work even you add csrf_token. Your account will be suspended 24 hours if you do so.

You may check last 2 commits of my chrome extension "Anki-dict-helper". I have to disable ankiweb interface to avoid my users account to be disabled.

Let me know if you have any progress.

ninja33 avatar Jan 22 '17 12:01 ninja33

@ninja33 doesn't problem solved via getting csrf_token for each request?

vvscode avatar Jan 22 '17 12:01 vvscode

I already tried to do this and my account was suspended for 24h. Now I'm rewriting the plugin to use local saving with exporting to CSV or APKG files

luzhanov avatar Jan 22 '17 18:01 luzhanov

@luzhanov @ninja33 I see that both of you use UI api instead of sync api from ankiweb. Is there any thoughts about it?

vvscode avatar Jan 22 '17 19:01 vvscode

@vvscode you're right, it was web API. Anyway I think we can't rely on reverse engineered API cause it can be blocked at any moment :( Also it can lead an addon users to a blocking (even permanent) on the Anki website, so I propose to focus our effort on the development of a local-saving version of addon.

luzhanov avatar Jan 22 '17 21:01 luzhanov

For instant card saving, you may have another option by using a very useful anki addon anki connect. It opened a JSON like interface to communicate with browser locally.

The only problem is that you have to keep anki desktop app opened.

ninja33 avatar Jan 22 '17 23:01 ninja33

@luzhanov I suppose that probability of closing sync api is veeeery small - it used by desktop application

vvscode avatar Jan 23 '17 04:01 vvscode

@ninja33 this plugin is good, and I'll think about using this connection, but I think that from user experience it's too complex to save in this way. I mean that for using it you need:

  1. Setup local Anki (some users can't do this to the company policy)
  2. Setup local Anki addon
  3. Setup chrome plugin
  4. Configure connection between them

The more steps we have the less people will use it :( But I think that this can be added to the plugin late as an option.

luzhanov avatar Jan 23 '17 10:01 luzhanov

@luzhanov +1 for the connect option. I don't think something similar to the Yomichan flow is too complicated for users who already have/use Anki desktop to add Anki connect plugin then connect to the chrome extension.

Out of beginner's curiosity, why isn't it possible (or a bad idea) to fill and submit the form to add a card by triggering buttons instead sending requests?

yosevu avatar Jan 24 '17 05:01 yosevu