Jump to content
Ultimaker Community of 3D Printing Experts
companje

UM3 API digest with cURL

Recommended Posts

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?

Edited by Guest

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×

Important Information

Terms of Use Privacy Policy