Kobo Proxy Response Status 401 on Kobo Sync (continuing #1027)
I'm really sorry but I have to reopen.
Still 401 error even after regenerating token. Both via reverse proxy and local IP.
This is the response when opening the url: http://LOCAL_IP:6060/api/kobo/49f3247a-1ebc-4d43-8671-4e396eeef172 {"ResponseStatus":{"ErrorCode":"UnauthorizedAccessException","Message":"Unauthorized Request. Missing authentication token."}}
And those are the logs: 2025-10-03T12:22:25.847+01:00 INFO 10 --- [booklore-api] [io-8080-exec-39] c.a.b.service.kobo.KoboServerProxy : Kobo proxy URL: https://storeapi.kobo.com 2025-10-03T12:22:26.171+01:00 INFO 10 --- [booklore-api] [io-8080-exec-39] c.a.b.service.kobo.KoboServerProxy : Kobo proxy response status: 401 ^^ When trying via local IP.
2025-10-03T12:22:37.530+01:00 INFO 10 --- [booklore-api] [nio-8080-exec-1] c.a.b.service.kobo.KoboServerProxy : Kobo proxy URL: https://storeapi.kobo.com 2025-10-03T12:22:37.670+01:00 INFO 10 --- [booklore-api] [nio-8080-exec-1] c.a.b.service.kobo.KoboServerProxy : Kobo proxy response status: 401 ^^ When trying via reverse proxy.
Originally posted by @m-zaw in #1027
I'm getting the same error.
I love to use this feature but got the same error message. Can't get it to work.
Same error here
Same error here. Version 1.10.0
Same error for me on the currently latest version 1.11.0. Edit: Doesn't really seem to matter for the Kobo sync to actually work?
Same error here with v1.12.0 using:
http://192.168.14.35:6070/api/kobo/c109c80b-f9df-45cc-bc6a-123456789d494
Server log: 2025-11-26T19:32:52.606Z INFO 9 --- [booklore-api] [nio-8080-exec-8] c.a.b.service.kobo.KoboServerProxy : Kobo proxy URL: https://storeapi.kobo.com
2025-11-26T19:32:52.724Z INFO 9 --- [booklore-api] [nio-8080-exec-8] c.a.b.service.kobo.KoboServerProxy : Kobo proxy response status: 401
FYI: If I try a different token I get the Access Denied error "Access to 192.168.14.35 was denied You don't have authorization to view this page. HTTP ERROR 403"
I am getting the same in 1.12.0 proxy and direct IP, I changed my token as well to see if something hadn't been set but no change.
I also get below in my log as well even with the proxy settings for nginx as described in the documentation for the Kobo sync.
java.lang.IllegalArgumentException: Invalid character found in the request target [/api/kobo/(my private token)/v1/assets?DiffRequests=[%7BKey:EPD-KoboPlus-ReadOnly-NeverSubscribed,ETag:W/NjM4MjU4OTA5NzgwMDAwMDAwLTMwMjQ1%7D] ]. The valid characters are defined in RFC 7230 and RFC 3986
These messages are harmless and won’t affect functionality:
java.lang.IllegalArgumentException: Invalid character found in the request target [/api/kobo/(my private token)/v1/assets?DiffRequests=[%7BKey:EPD-KoboPlus-ReadOnly-NeverSubscribed,ETag:W/NjM4MjU4OTA5NzgwMDAwMDAwLTMwMjQ1%7D] ]. The valid characters are defined in RFC 7230 and RFC 3986
Server log:
2025-11-26T19:32:52.606Z INFO 9 --- [booklore-api] [nio-8080-exec-8] c.a.b.service.kobo.KoboServerProxy : Kobo proxy URL: [storeapi.kobo.com](https://storeapi.kobo.com/)
These messages are harmless and won’t affect functionality:
java.lang.IllegalArgumentException: Invalid character found in the request target [/api/kobo/(my private token)/v1/assets?DiffRequests=[%7BKey:EPD-KoboPlus-ReadOnly-NeverSubscribed,ETag:W/NjM4MjU4OTA5NzgwMDAwMDAwLTMwMjQ1%7D] ]. The valid characters are defined in RFC 7230 and RFC 3986Server log: 2025-11-26T19:32:52.606Z INFO 9 --- [booklore-api] [nio-8080-exec-8] c.a.b.service.kobo.KoboServerProxy : Kobo proxy URL: [storeapi.kobo.com](https://storeapi.kobo.com/)
@adityachandelgit Thanks for getting back here—I think the issue for me is that kobo sync never worked for me with Booklore, and this message was the only error message I was able to see that might be related. Kobo sync not working is the only issue I have that’s holding me back from actually using Booklore, keeping me on Calibre Web.
I figured out my issue in that even with the nginx proxy configuration entries noted in the setup documentation there is something wrong in the nginx configuration I have (I use SWAG which is plain ngnix ), as if I put in the "api_endpoint" as the IP address and port of booklore it is working but not through the reverse proxy. I tried correcting my nginx configuration but wasn't able to get anything working as of yet. I think someone sharing a working subdomain configuration file will get a lot of people sorted, but I haven't got there myself.
I think someone sharing a working subdomain configuration file will get a lot of people sorted, but I haven't got there myself.
Not nginx and so not sure how relevant but here is the relevant portion of my caddyfile that has been working without any issues for me.
# Caddy file for sending traffic to podman pods/containers
{
acme_dns cloudflare {env.CLOUDFLARE_API_TOKEN}
}
*.mydomain.xyz {
log {
output file /data/traffic.log
}
tls {
dns cloudflare {env.CLOUDFLARE_API_TOKEN}
}
# traffic hits this endpoint
@books host books.mydomain.xyz
# forwarded to my booklore pod
reverse_proxy @books booklore-pod:6060 {
flush_interval -1
}
}
I figured out my issue in that even with the nginx proxy configuration entries noted in the setup documentation there is something wrong in the nginx configuration I have (I use SWAG which is plain ngnix ), as if I put in the "api_endpoint" as the IP address and port of booklore it is working but not through the reverse proxy. I tried correcting my nginx configuration but wasn't able to get anything working as of yet. I think someone sharing a working subdomain configuration file will get a lot of people sorted, but I haven't got there myself.
This is my SWAG config that works. Hope that helps.
server {
listen 443 ssl;
listen [::]:443 ssl;
server_name mysub.domain.com;
include /config/nginx/ssl.conf;
client_max_body_size 0;
location / {
include /config/nginx/proxy.conf;
include /config/nginx/resolver.conf;
set $upstream_app Booklore;
set $upstream_port 6060;
set $upstream_proto http;
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
}
location /api/kobo/ {
include /config/nginx/resolver.conf;
set $upstream_app Booklore;
set $upstream_port 6060;
set $upstream_proto http;
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Port $server_port;
proxy_buffer_size 128k;
proxy_buffers 4 256k;
proxy_busy_buffers_size 256k;
}
}
I suspect the issue comes from missing Nginx buffer settings that are normally required for Booklore sync:
# Required buffer settings
proxy_buffer_size 128k;
proxy_buffers 4 256k;
proxy_busy_buffers_size 256k;
large_client_header_buffers 8 32k;
Since I am using Zoraxy as my reverse proxy – and it does not expose or support these buffer directives – the sync request fails.
Is my assumption correct that the missing Nginx buffer config in Zoraxy is causing the sync failure?
I am experiencing this issue without nginx and when I try to hit that URL from the same network.