Good M@rning!
I have a scenario where I have setup a basic Wowza server instance on my PC (localhost). Now, I would like to use restful API with Wowza using curl. I got some basic direction here: https://www.wowza.com/docs/how-to-use-curl-to-query-wowza-rest-api, but, with whatever queries I tried (either GET or POST method), I always get the same error: “The request requires user authentication”.
For example, I tried different combinations:
curl -X GET --header 'Accept:application/json; charset=utf-8' http://taha:a1@localhost:8087/v2/servers/_defaultServer_/vhosts/_defaultVHost_/applications
curl -X GET --header 'Accept:application/json' http://taha:a1@localhost:8087/v2/servers/_defaultServer_/vhosts/_defaultVHost_/applications
curl -X GET --header 'Accept:application/json; charset=utf-8' http://localhost:8087/v2/servers/_defaultServer_/vhosts/_defaultVHost_/applications
curl -X POST -H "Accept:application/json; charset=utf-8" -H "Content-type:application/json; charset=utf-8" http://taha:a1@localhost:8087/v2/servers/_defaultServer_/vhosts/_defaultVHost_/applications/testlive -d '{"restURI":"http://localhost:8087/v2/servers/_defaultServer_/vhosts/_defaultVHost_/applications/testlive","name":"testlive","appType":"Live","clientStreamReadAccess":"*","clientStreamWriteAccess":"*","description":"Testing our Rest Service","streamConfig":{"restURI":"http://taha:a1@localhost:8087/v2/servers/_defaultServer_/vhosts/_defaultVHost_/applications/testlive/streamconfiguration","streamType":"live"}}'
curl -X GET --header 'Accept:application/json; charset=utf-8' http://localhost:8087/v2/servers/_defaultServer_/vhosts/_defaultVHost_/applications/testlive/streamfiles
All return the same error:
C:\Users\Admin>curl -X GET --header 'Accept:application/json; charset=utf-8' http://taha:a1@localhost:8087/v2/servers/_defaultServer_/vhosts/_defaultVHost_/applications
curl: (6) Couldn't resolve host 'charset=utf-8''
<?xml version="1.0" encoding="UTF-8" standalone="no"?><error><wowzaServer>4.2.0</wowzaServer><code>401</code><message>The request requires user authentication</message></error>
C:\Users\Admin>
I noticed this error message is not documented in the page referenced, what am I missing?
Note: taha is username, and a1 is password. I tried different combinations, with and without the username/password string so it may not display the same error over and over.
Wowza server version is 4.2.0.
Thanks…