PrusaConnect API - having a hard time finding doc and connecting
 
Notifications
Clear all

PrusaConnect API - having a hard time finding doc and connecting  

  RSS
Slicster
(@slicster)
Active Member
PrusaConnect API - having a hard time finding doc and connecting

Hi,

I've been testing connections to PrusaLink API(Successful) and PrusaConnect(Unsuccessful) and I'm wondering if someone can point me to a doc on how to get authorized and connected?  I'm trying to write a simple script to connect to the API and download a snapshot.

I'm trying the following but I get:  Invoke-WebRequest: {"message": "Missing or invalid security token", "code": "UNAUTHORIZED"}

$Token = 'XXXXXXXXXX' #Token in prusaconnect

$headers = @{
"Content-Type"="application/json"
"Token"="$Token"
}

$URI = "https://connect.prusa3d.com/app/cameras/#####/snapshots/last"
$Info = Invoke-WebRequest $URI -Headers $headers -Method GET

Any help would be appreciated as I'd like to try and create from timelapses.

Posted : 02/02/2024 10:02 pm
_KaszpiR_
(@_kaszpir_)
Honorable Member
RE: PrusaConnect API - having a hard time finding doc and connecting

AFAIR you need to implement Digest auth https://en.wikipedia.org/wiki/Digest_access_authentication

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

Posted : 05/02/2024 10:59 am
Tojik
(@tojik)
Member Moderator
RE: PrusaConnect API - having a hard time finding doc and connecting

Hi, we do not publish the connect api, so unless you scan what your printer does when you turn off tls, you probably won't get far.
For PrusaLink, you don't have to do digest, you can find a button in settings that generates an api key and you can use that no problem AFAIK

Posted : 06/02/2024 12:18 pm
Share: