Sorry, if this question is already answered somewhere. I’ve created Cambridge 1875288089 add-on and adapted previous authentication mechanism with GitHub actions. Recently, I’ve discovered that this mechanism changed to something called sveltekit. I’ve worked payload and understand, that logging and password are being sent as a octet bitstream. I’ve recreated such requests but Ankiweb refuse to authenticate me with 422 http response.
If it’s possible, please advice me how I should implement it properly?
If you are trying to upload your add-on automatically, AnkiWeb does not currently have a public API for this, so you’ll need to use the website for now.
Alright, the first part - authentication - has been done. It turned out that payload data has this structure '\n\u0010$ANKI_LOGIN\u0012\u000$ANKI_PASSWORD'
Now, the next hurdle to overcome - sending form data, but now, with Svelte, it’s no more usual form-data, it’s octet stream with ambiguous delimiters between parts. Also, it’s surprising that chosen for updating zip file is being sent uncompressed as a stream of ascii chars (like tar all files into 1 file and send it).
You’re accessing a private API, which is against the T&Cs. I’m afraid you will need to do this manually until such time as an official API is provided.