Repository navigation
|
I am trying to track down why I'm not seeing sync between CrossInk and KOReader. If I go to the app, I see the CrossInk syncs, but books I sync with KOReader do not show up. I thought I would try to use the API to see what has been recorded, but when I do: curl -X POST http://koreader-sync.home/api/v1/stats/global \
-H 'content-type: application/json' \
-d '{"username":"my-user","password":"'"$(printf '%s' 'my-password' | md5sum | cut -d' ' -f1)"'"}'I get |
Replies: 2 comments
|
There are two differences between that request and the documented API:
Using placeholders and your server's HTTPS base URL: SYNC_BASE='https://your-sync-host'
SYNC_USER='your-koreader-sync-user'
SYNC_KEY='<md5-of-your-koreader-sync-password>'
curl -sS "$SYNC_BASE/users/auth" \
-H "x-auth-user: $SYNC_USER" \
-H "x-auth-key: $SYNC_KEY"
curl -sS "$SYNC_BASE/api/v1/stats/global" \
-H "x-auth-user: $SYNC_USER" \
-H "x-auth-key: $SYNC_KEY"The key here is the MD5 password value used by the KOSync protocol, not the plaintext password in your To investigate which books/progress arrived, query
References: API authentication and endpoints, |
|
Thanks, that's very helpful. I am seeing some progress pushed from other devices, so I think I must have a filename mismatch. I also learned reading the API pages that KOReader added the ability to send metadata, so I have set that now. Now it would be great if they added the ability to send clippings! |
There are two differences between that request and the documented API:
x-auth-userandx-auth-keyheaders, rather thanusername/passwordin theJSON body.
/api/v1/stats/globaluses GET. PUT uploads a device's snapshot; POST is not the documentedread operation.
Using placeholders and your server's HTTPS base URL:
The key here is the MD5 pass…