[API] - Websockets Permission Issue
Hello,
I am using the latest version of the Repetier-Server and attempting to use the API via websockets per the guide. I am able to receive all events correct, respond to pings and keep the connection alive however if I attempt to perform an action such as action: preheat via an already open websocket I get an error, "permission denied".
My Repetier-Server has no users defined and my connection string includes my API key:
I am using the latest version of the Repetier-Server and attempting to use the API via websockets per the guide. I am able to receive all events correct, respond to pings and keep the connection alive however if I attempt to perform an action such as action: preheat via an already open websocket I get an error, "permission denied".
My Repetier-Server has no users defined and my connection string includes my API key:
`ws://192.168.0.7:3344/socket/?lang=en&apikey=${apikey_sc1}`
If I attempt non-sensetive commands they work fine and get a response. Upon login I do not get a "login required" message and after starting the socket I do get an event userCredentials returned:
login: 'global',
If I attempt non-sensetive commands they work fine and get a response. Upon login I do not get a "login required" message and after starting the socket I do get an event userCredentials returned:
login: 'global',
permissions: 65535,
Could you please point me in the right direction as I may be missing something obvious.
Could you please point me in the right direction as I may be missing something obvious.
Comments
if(printer != nullptr && (hasPermission(obj, out,Permission::PRINT)) && obj.count("extruder") == 1 && obj.count("bed") == 1 && obj.count("chamber") == 1)
I guess you have omitted one of the parameter extruder/bed/chamber so function does not see it. Permission denied is a bit misleading as it is only one reason, also the only one that happens with correct request implementation.preheat (0.91.2)
Parameter: extruder (int) = cooldown 0/no, 1/all extruders, bed (int) = preheat all beds, chamber (int) = preheat all cham