FooSoft / yomichan

Japanese pop-up dictionary extension for Chrome and Firefox.
https://foosoft.net/projects/yomichan
Other
1.06k stars 217 forks source link

[Feature Request] Add support for AnkiConnect apiKey #2139

Closed cabo40 closed 2 years ago

cabo40 commented 2 years ago

Hi, sorry if I'm missing the config, but, is there a way to connect to Anki when an apiKey is set?

toasted-nutbread commented 2 years ago

On the settings page, try changing AnkiConnect server address to http://127.0.0.1:8765/?key=YOUR_API_KEY

cabo40 commented 2 years ago

Tanks for the suggestion, I've tried with this url http://127.0.0.1:8765/?key=pass in Yomichan v22.4.4.0 and this settings in AnkiConnect, Anki v2.1.51

{
    "apiKey": "pass",
    "apiLogPath": null,
    "ignoreOriginList": [],
    "webBindAddress": "127.0.0.1",
    "webBindPort": 8765,
    "webCorsOriginList": [
        "http://localhost"
    ]
}

without luck. Is this config working on your side?

toasted-nutbread commented 2 years ago

You're right, this doesn't work (I didn't look deeply into the code before making this guess). It looks like Yomichan doesn't currently support API key, so this functionality would need to be added.

cabo40 commented 2 years ago

Thanks for trying to replicate!