Skip to content
Discussion options

You must be logged in to vote

There are two differences between that request and the documented API:

  1. Authentication uses x-auth-user and x-auth-key headers, rather than username/password in the
    JSON body.
  2. Reading /api/v1/stats/global uses GET. PUT uploads a device's snapshot; POST is not the documented
    read operation.

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 pass…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by pdc1
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants