Wowza Community

Invalid Api Key Error

Input Params:
{ “live_stream”: { “aspect_ratio_height”: 1080, “aspect_ratio_width”: 1920, “billing_mode”: “pay_as_you_go”, “broadcast_location”: “asia_pacific_india”, “encoder”: “wowza_gocoder”, “name”: “My Live Stream”, “transcoder_type”: “transcoded”, “closed_caption_type”: “none”, “delivery_method”: “push”, “delivery_protocols”: [ “rtmp”, “rtsp”, “wowz” ], “delivery_type”: “single-bitrate”, “disable_authentication”: false, “hosted_page”: true, “hosted_page_description”: “My Hosted Page Description”, “hosted_page_logo_image”: “[Base64-encoded string representation of GIF, JPEG, or PNG file]”, “hosted_page_sharing_icons”: true, “hosted_page_title”: “My Hosted Page”, “low_latency”: false, “password”: “XXXXXXXX”, “player_countdown”: true, “player_countdown_at”: “2019-01-30 17:00:00 UTC”, “player_logo_image”: “[Base64-encoded string representation of GIF, JPEG, or PNG file]”, “player_logo_position”: “top-right”, “player_responsive”: false, “player_type”: “wowza_player”, “player_video_poster_image”: “[Base64-encoded string representation of GIF, JPEG, or PNG file]”, “player_width”: 640, “recording”: true, “remove_hosted_page_logo_image”: true, “remove_player_logo_image”: true, “remove_player_video_poster_image”: true, “source_url”: “xyz.streamlock.net/vod/mp4:Movie.mov”, “target_delivery_protocol”: “hls-https”, “use_stream_source”: false, “username”: “client2” } }

Response:
{ “meta”: { “status”: 401, “code”: “ERR-401-InvalidApiKey”, “title”: “Invalid Api Key Error”, “message”: “Invalid API key.”, “description”: “” }, “request_id”: “XXXXXXXXXX181be96328feb3de”, “request_timestamp”: “2019-12-13T09:29:40.275Z” }

This error triggers when the proper keys and headers were not configured properly as shown below.

curl -X GET \
-H "wsc-api-key: ${WSC_API_KEY}" \
-H "wsc-access-key: ${WSC_ACCESS_KEY}" \
"{WSC_HOST}/api/${WSC_VERSION}/live_streams"
  1. Please review here where to properly locate your API key.

  2. Check the examples on the required headers using the keys here.

  3. Use the sandbox to practice making a an API call with the keys in the correct format. As you may already know, the sandbox is for practice only, you’ll need to remove “sandbox” from your true production url.

See below url examples:

In the Wowza Streaming Cloud REST API sandbox environment, the base URL is

https://api.sandbox.cloud.wowza.com/api/[version]/

In the Wowza Streaming Cloud REST API production environment, the base URL is

https://api.cloud.wowza.com/api/[version]/

Lastly, here is a tutorial showing you how to use the proper headers and API call structure.

https://www.youtube.com/watch?v=l9MSuzZi0Go

Your post was edited to protect your account info. Please do not publicly post your private API keys.