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

  • Our picks

    • Ultimaker Cura | a new interface
      We're not only trying to always make Ultimaker Cura better with the usual new features and improvements we build, but we're also trying to make it more pleasant to operate. The interface was the focus for the upcoming release, from which we would already like to present you the first glance. 
        • Like
      • 121 replies
    • "Back To The Future" using Generative Design & Investment Casting
      Designing for light-weight parts is becoming more important, and I’m a firm believer in the need to produce lighter weight, less over-engineered parts for the future. This is for sustainability reasons because we need to be using less raw materials and, in things like transportation, it impacts the energy usage of the product during it’s service life.
        • Like
      • 12 replies
×

Important Information

Welcome to the Ultimaker Community of 3D printing experts. Visit the following links to read more about our Terms of Use or our Privacy Policy. Thank you!