D4100-E network strobe control with http POST #394
-
I am trying to send commands the D4100-E network strobe. curl -X POST -u root:mypass http://192.168.2.146/axis-cgi/siren_and_light.cgi -H "Content-Type: application/json" --data '{ "apiVersion":"1.0", "context":"My Context", "method":"start", "params": { "profile":"LSI-RED" } }' Just to turn the strobe on RED. I get this back: <title>401 Unauthorized</title>UnauthorizedThis server could not verify that you are authorized to access the document requested. Either you supplied the wrong credentials (e.g., bad password), or your browser doesn't understand how to supply the credentials required. however I know the user root and mypass are correct as that is what I logged in with. Anyone doing this - thoughts ? Jerry |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
This automatically generated reply acts as a friendly reminder. Answers to your questions will most often come from the community, from developers like yourself. You will, from time to time, find that Axis employees answers some of the questions, but this is not a guarantee. Think of the discussion forum as a complement to other support channels, not a replacement to any of them. If your question remains unanswered for a period of time, please revisit it to see whether it can be improved by following the guidelines listed in Axis support guidelines. |
Beta Was this translation helpful? Give feedback.
-
I just updated to Current version: 11.5.64, still same issue for me. |
Beta Was this translation helpful? Give feedback.
-
Hi @JerryGeis , I assume you should specify the authentication method as digest authentication. Please use following command: curl --digest -u root:mypass http://192.168.2.146/axis-cgi/siren_and_light.cgi -H "Content-Type: application/json" --data '{ "apiVersion":"1.0", "context":"My Context", "method":"start", "params": { "profile":"LSI-RED" } }' |
Beta Was this translation helpful? Give feedback.
-
Thank you! adding the --digest to my command did the trick. Have a great day! |
Beta Was this translation helpful? Give feedback.
Hi @JerryGeis ,
I assume you should specify the authentication method as digest authentication.
Please use following command: