Hmm, yes I tried that. with ultimaker/ultimaker -> no luck.
ultimaker/ultimaker is not a valid id/key combination fo the apis, it is for SSH login.
You have to carefully read the description of the authentication api I mentioned above.
First of all you have to make an auth request with your parameters like user, application. Then you have to confirm this request on the printer display it self.
Only then can you use the id/key combination to authenticate your other API calls.
- 1
OK, sorry my mistake. So I did like this - safari/hakanfa, confirmed in UM S5. So far so good. But when trying the "post material" I still get the Authorization required message. Should I put the user info in the XML file somehow?
Thank you very much for swift replies!
When you did the auth request, you got a json response with id and key.
{
"id": "string",
"key": "string"
}
This is your username (id) and password (key).
Then you have to use both parameters for the http digest authentication. How you have to use the digest authentication depends on your scripting language.
For Python (untested, just out of my head):
from requests.auth import HTTPDigestAuth url = 'http://<printer-ip>/api/v1/materials' requests.get(url, auth=HTTPDigestAuth('user', 'pass'))
And if you don't use any scripting language, but just the browser, then you need to enter id/key in the popup window which is shown after calling the api.
If no popup is shown, then close your browser and open it again.
Ok, now I understand. - thank you, will try it out as soon as I come home.
I will just call the post material API via the browser. The purpose of doing this is that I use the UM material station - all works fine with NFC tagged filaments but I use a lot of 3rd party filaments like Colorfabb. If you have many “generic pla:s” the Cura/UM does not know which to choose. One update proposal to Cura would be ability to choose from what bay to load the filament - not only the type of filament.
44 minutes ago, hakanfa said:If you have many “generic pla:s” the Cura/UM does not know which to choose. One update proposal to Cura would be ability to choose from what bay to load the filament - not only the type of filament.
I guess this feature will come in future firmware/Cura updates.
- 2 weeks later...
You can also import the material into cura, if it is connected to your printer then upon restarting cura it will sync materials with the printer.
- 4 years later...
Hi everyone can you please tell me how to set the hotend temperature uisng API in ultimaker S5 pro
Recommended Posts
Smithy 1,146
You have to authenticate yourself for most write requests.
Check out these APIs:
This generates new id/key combination that has to be used as username/password in the digest authentication on certain APIs.
Link to post
Share on other sites