Jump to content

UM3 API digest with cURL


companje

Recommended Posts

Posted (edited) · UM3 API digest with cURL

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
  • 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 5.8 beta released
        Another Cura release has arrived and in this 5.8 beta release, the focus is on improving Z seams, as well as completing support for the full Method series of printers by introducing a profile for the UltiMaker Method.
          • Like
        • 1 reply
      • Introducing the UltiMaker Factor 4
        We are happy to announce the next evolution in the UltiMaker 3D printer lineup: the UltiMaker Factor 4 industrial-grade 3D printer, designed to take manufacturing to new levels of efficiency and reliability. Factor 4 is an end-to-end 3D printing solution for light industrial applications
          • Thanks
          • Like
        • 3 replies
    ×
    ×
    • Create New...