Results 1 to 7 of 7

Thread: RESTful API using CURL does not work as expected

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jul 2015

    Default RESTful API using CURL does not work as expected

    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:, 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>
    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.

    Last edited by tahaOS; 07-22-2015 at 06:48 AM. Reason: typo

Similar Threads

  1. Calculating Expected Costs
    By HiDaveGeorge in forum Wowza Media Server 3 for Amazon EC2 Discussion
    Replies: 3
    Last Post: 06-10-2012, 07:30 AM
  2. MediaCache does not work http URL ( Item does not exist )
    By huge123 in forum Server-side Modules and Code Samples Discussion
    Replies: 3
    Last Post: 12-19-2011, 05:43 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts