Comments (10)
Can you confirm that
curl --user <username> https://paper.host.tld/paperless/api/documents
works? It should return a large list of documents.
Don't forget trailing slashes. I think they are required.
from paperless_app.
Thanks for posting the solution! This should probably be changed in the documentation(s).
Edit: I see you're already one step ahead here 😄
from paperless_app.
Hey Robert,
do you use a reverse proxy in front of paperless?
from paperless_app.
I'm using Apache and mod_wsgi like described here: https://paperless.readthedocs.io/en/latest/setup.html#making-things-a-little-more-permanent
But I changed Alias
to /paperless/static
and WSGIScriptAlias
to /paperless
.
from paperless_app.
Can you confirm that
curl --user <username> https://paper.host.tld/paperless/api/documents/
works? It should return a long list of documents.
Edit: This originally did not include the slash at the end.
from paperless_app.
Using curl I get a redirect to location: /paperless/api/documents/
and then the same error:
< HTTP/2 403
{"detail":"Authentication credentials were not provided."}
With correct, incorrect and no password it's the same response.
When I open this URL logged in the browser it works:
GET /paperless/api/documents/
HTTP 200 OK
Allow: GET, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept
{
"count": 44,
"next": "https://paper.host.tld/paperless/api/documents/?page=2",
"previous": null,
"results": [
{
"id": 28,
"correspondent": null,
"title": "0120",
...
from paperless_app.
Thanks for confirming. This looks like a server issue then. The browser uses a different authentication mechanism with cookies which is why it works fine there.
It's not quite clear to me why this doesn't work but then again I don't work much with Apache.
from paperless_app.
try
curl --user <username> --basic https://paper.host.tld/paperless/api/documents/
which should ask you for your password and verify that authentication works.
from paperless_app.
Thanks, yes with and also without --basic
the password prompt appears:
Enter host password for user 'myuser':
The response is the same as above.
from paperless_app.
I got it!
Thanks for nudging me in the right direction. I didn't know that the API uses basic auth.
In order to have basic auth working with wsgi this is needed in the apache conf: WSGIPassAuthorization On
.
https://www.django-rest-framework.org/api-guide/authentication/#setting-the-authentication-scheme
Created a PR to the documentation. Now on to try the app :)
from paperless_app.
Related Issues (20)
- [iOS] ADD files from Files.app HOT 1
- IOS App Bug On Initial Connection HOT 6
- support for SECOND frontend http auth login HOT 1
- iOS upload not working HOT 1
- WRONG_VERSION_NUMBER HOT 1
- Wrong language in dates
- App shows wrong "create date"
- other paperless app, merge?
- It used to work but not anymore
- Meaningfull download filename ( config option ? ) instead of Document ID.
- “Error while connecting to server” with -ngx HOT 1
- No login to the server possible HOT 2
- Login not possible anymore HOT 1
- Feature request: support multiple paperless instances
- Add custom header (ie: X-Api-Key) to all requests
- mTLS Client Authentication to reverse proxy
- New Correspondent, Document Type, or Tag just shows Gray Screen when within a document HOT 1
- support backup with Seedvault
- Android 13 (SDK 33) not supported
- Editing documents with paperless-ngx 2.0 fails HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from paperless_app.