PrusaConnect Camera API issue with fingerprint
 
Notifications
Clear all

[Solved] PrusaConnect Camera API issue with fingerprint  

  RSS
Pitel
(@pitel)
Eminent Member
PrusaConnect Camera API issue with fingerprint

Hi,
I'm trying ot make an Android app, so the phone could be used as a camera, even when the phone is locked and the app is in background.

Anyway, When I'm sending the inital info request, everything works fine:

--> PUT  https://webcam.connect.prusa3d.com/c/info  h2
Token: qJ6yPMKEK32vrrj8EjU1
Fingerprint: google/oriole_beta/oriole:14/U1B1.230908.003/10811961:user/release-keys
Content-Type: application/json; charset=utf-8
Content-Length: 56
Host: webcam.connect.prusa3d.com
Connection: Keep-Alive
Accept-Encoding: gzip
User-Agent: okhttp/4.11.0
{"config":{"name":"Pixel 6","trigger_scheme":"TEN_SEC"}}
--> END PUT (56-byte body)
<-- 200  https://webcam.connect.prusa3d.com/c/info  (116ms)
date: Thu, 21 Sep 2023 09:32:35 GMT
content-type: application/json; charset=utf-8
content-length: 253
x-powered-by: Poor WSGI for Python
strict-transport-security: max-age=15724800; includeSubDomains
{"id": 16262, "name": "Pixel 6", "config": {"name": "Pixel 6", "trigger_scheme": "TEN_SEC"}, "sort_order": 1, "token": "qJ6yPMKEK32vrrj8EjU1", "origin": "WEB", "registered": true, "team_id": XXXX, "printer_uuid": "XXXXXXX"}
<-- END HTTP (253-byte body)

But later, when I repeat the exactly the same request, I get 403 and

{"message": "Fingerprint is not valid", "code": "FORBIDDEN_INVALID_FINGERPRINT"}

So, what's wrong with my fingerprint?! Your documentation just states it should be at least 16 characters long. Do you have any more (undocumented) assumptions about that string?

Best Answer by Tojik:

Hi, the fingerprint lengthe is limited to 64 characters. We will update the docs. Sorry

This topic was modified 1 year ago 2 times by Pitel
Posted : 21/09/2023 9:42 am
Tojik
(@tojik)
Member Moderator
RE: PrusaConnect Camera API issue with fingerprint

Hi, the fingerprint lengthe is limited to 64 characters. We will update the docs. Sorry

Posted : 21/09/2023 10:12 am
Pitel
(@pitel)
Eminent Member
Topic starter answered:
RE: PrusaConnect Camera API issue with fingerprint

Another issue I found: there is some file size limit for images. And when it's exceeded, you get Nginx's HTML error page instead of JSON error from the webapp. Which is understandable, but would be nice know the limit berforehand, so I could prevent the upload and automaticaly lower the JPEG quality or resolution next time. Or maybe increase it? The full-quality pictures from my Pixel phone are quite large (5-10 MB). 

Posted : 23/09/2023 12:13 pm
_KaszpiR_
(@_kaszpir_)
Honorable Member
RE: PrusaConnect Camera API issue with fingerprint

AFAIR default nginx config allows 1MB file uploads, but you could try uploading different file sizes to detect it yourself, I guess it maybe around 8MB?

See my GitHub and printables.com for some 3d stuff that you may like.

Posted : 23/09/2023 12:56 pm
Tojik
(@tojik)
Member Moderator
RE: PrusaConnect Camera API issue with fingerprint

Yea, would be nice knowing there is a limit before releasing PrusaLink 😅

i tested 4k and it seemed fine. Did not have a camera that Wleould hit the limit, so I assumed it's not a problem

Posted : 02/10/2023 9:13 am
volkersfreunde
(@volkersfreunde)
Member
RE: PrusaConnect Camera API issue with fingerprint

I started to collect and would improve the OPEN API spec at https://github.com/falkorichter/prusa-connect-api.

What is the fingerprint - can´t find the answer here... https://github.com/falkorichter/prusa-connect-api/issues/2 is my "issue"

Posted : 03/10/2023 8:35 pm
volkersfreunde
(@volkersfreunde)
Member
RE: PrusaConnect Camera API issue with fingerprint

On the file size limit: https://github.com/falkorichter/prusa-connect-api/issues/3 4k seems not to be the size limit...

Posted : 03/10/2023 8:42 pm
Tojik
(@tojik)
Member Moderator
RE: PrusaConnect Camera API issue with fingerprint

Should be 8MB. Will update the doc hopefully. Stuff is just on fire lately

Posted : 03/10/2023 9:14 pm
volkersfreunde
(@volkersfreunde)
Member
RE: PrusaConnect Camera API issue with fingerprint

I wil update the fork of the file on that repo...

Posted : 05/10/2023 6:55 pm
Share: