The documentation on the Ultimaker 3 (http://UM3/docs/api) contains good examples of how to do PUT and POST requests and I also found a good Python example by Daid) that handles the Digest authentication the Ultimaker 3 uses.
However, I can't find how to do the 'Digest' authentication from cURL. This is not in the examples in the documentation.
I tried adding "--digest --user id:key" to the command but it gives a "message": "400: Bad Request".
$ curl --digest --user 1269546bd8958aa0524c06bc9b18cd6c:9694590217578cf334fbe5d594bc243456d46257f7f10233cb4cf2e3548b5102 -X PUT --header 'Content-Type: application/json' --header 'Accept: application/json' --data '{ \
"hue": 0, \
"saturation": 255, \
"value": 255 \
}' 'http://10.0.0.39/api/v1/printer/led'
{
"message": "400: Bad Request"
}
When I just add "--user id:key" (without --digest) it gives {"message": "Authorization required."}. Probably because it tries Basic Auth instead of Digest?
What would be the correct cURL command for the Digest Authentication?