Wowza Community

Wowza Rest api using curl in php always return key not send in header

I’m trying to consume wowza rest api using php with curl following is my code

$url = '';

$headers = array(
$cr = curl_init($url);
      curl_setopt($cr, CURLOPT_HTTPHEADER,$headers);
      $res = curl_exec($cr);

when i dd the response i get this

{“meta”:{“status”:401,“code”:“ERR-401-NoApiKey”,“title”:“No Api Key Error”,“message”:“No API key sent in header.”,“description”:""}}

What could be the reason,


Have you competed this step already?

You will need to request API access via your cloud account and then you will see the API keys in your account.


i got my api and access key and send it in the header is shown in the code above but here i removed my actual key.

but still it return the above response ?

Each key in your header array needs to be in quotes.

$headers = array("wsc-access-key:myaccessKy";"wsc-api-key:myapikey");