Hi
I need to use user/pwd auth for an API POST call (POST item) because the device does only support this auth type.
I enabled “Allow Basic Authentication” in API Security, but I cannot figure out how to provide the credentials (or the issue is a special character in the pwd? I have a ! in it).
Additinally, is it possible to add an additional user, or do I have to use the default admin user defined at setup ?
This is my curl call (user/pwd/hostIP/port masked):
curl -v -X POST -H "Content-Type: text/plain" "http://user:password@hostIP:port/rest/items/dingzButton3Single"
The result should be a “received command” in the event log.
REMARK: the call is working with API-Token
curl -v -X POST -H "Content-Type: text/plain" "http://hostIP:port/rest/items/dingzButton3Single?access_token=myToken"
EDIT:
The issue was caused by the ! character in the pwd. With a simpler pwd it works.
But I’m stll interested if it is possible to add an additional user ?