Title: Plugin error &#8220;missingRequiredParameter&#8221; on front end
Last modified: July 10, 2022

---

# Plugin error “missingRequiredParameter” on front end

 *  [GermanKiwi](https://wordpress.org/support/users/germankiwi/)
 * (@germankiwi)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/plugin-error-missingrequiredparameter-on-front-end/)
 * Hi [@macbookandrew](https://wordpress.org/support/users/macbookandrew/),
 * I installed your plugin yesterday, and set it up correctly with my API key and
   YouTube channel ID, etc.
 * For the fallback behaviour, I selected “Show scheduled lived videos”.
 * On my YouTube channel yesterday, I had one upcoming scheduled live video, which
   was scheduled for the following day, ie. this morning. (It’s for a church website).
 * When I put the [youtube_live] shortcode into my page yesterday, it showed the
   upcoming scheduled live video correctly. Everything worked as expected. I even
   tested it (yesterday) by then marking this morning’s upcoming livestream video
   as “private”, so it wouldn’t display, and the plugin then “fell back” nicely 
   by showing the livestream video from last week, which is exactly what I wanted
   it to do.
 * However, this afternoon – ie. after the livestreamed video had finished, and 
   there is not another live video scheduled in the future yet – I’m getting a strange
   error on my webpage, which says this:
 * > WP YouTube Live error:
   > Domain: [http://youtube.parameter](http://youtube.parameter)
   >  Reason: missingRequiredParameter
   > Message: No filter selected. Expected one of: myRating, chart, id Extended 
   > help: WP YouTube Live error:
 * Note that this error is publicly visible to everyone. I have no idea what it 
   means. Can you kindly help?
 * The plugin settings page says: “Note: if you have no upcoming scheduled videos,
   the last scheduled video will be shown instead.”
 * So my expectation is that if I don’t have a new scheduled live video set for 
   a future date, then the plugin should show the previous livestream video, ie.
   the one from this morning. But it isn’t doing that, for some reason.
 * Below are the contents of the debugging information from the HTML comment:
 *     ```
       <!-- YouTube Live debugging: 
       EmbedYoutubeLiveStreaming::__set_state(array(
          'channelId' => '[MY-CHANNEL-ID]',
          'API_Key' => '[MY-API-KEY]',
          'jsonResponse' => '{
         "error": {
           "code": 400,
           "message": "No filter selected. Expected one of: id, myRating, chart",
           "errors": [
             {
               "message": "No filter selected. Expected one of: id, myRating, chart",
               "domain": "youtube.parameter",
               "reason": "missingRequiredParameter",
               "location": "parameters.",
               "locationType": "other"
             }
           ]
         }
       }
       ',
          'objectResponse' => 
         (object) array(
            'error' => 
           (object) array(
              'code' => 400,
              'message' => 'No filter selected. Expected one of: id, myRating, chart',
              'errors' => 
             array (
               0 => 
               (object) array(
                  'message' => 'No filter selected. Expected one of: id, myRating, chart',
                  'domain' => 'youtube.parameter',
                  'reason' => 'missingRequiredParameter',
                  'location' => 'parameters.',
                  'locationType' => 'other',
               ),
             ),
           ),
         ),
          'arrayResponse' => 
         array (
           'error' => 
           array (
             'code' => 400,
             'message' => 'No filter selected. Expected one of: id, myRating, chart',
             'errors' => 
             array (
               0 => 
               array (
                 'message' => 'No filter selected. Expected one of: id, myRating, chart',
                 'domain' => 'youtube.parameter',
                 'reason' => 'missingRequiredParameter',
                 'location' => 'parameters.',
                 'locationType' => 'other',
               ),
             ),
           ),
         ),
          'errorMessage' => 'No filter selected. Expected one of: id, myRating, chart',
          'errorArray' => 
         array (
           0 => 
           array (
             'message' => 'No filter selected. Expected one of: id, myRating, chart',
             'domain' => 'youtube.parameter',
             'reason' => 'missingRequiredParameter',
             'location' => 'parameters.',
             'locationType' => 'other',
           ),
         ),
          'isLive' => NULL,
          'queryData' => 
         array (
           'key' => '[MY-API-KEY]',
           'part' => 'id,snippet',
           'id' => NULL,
         ),
          'getAddress' => 'https://www.googleapis.com/youtube/v3/',
          'getQuery' => 'key=[MY-API-KEY]&part=id%2Csnippet',
          'queryString' => 'https://www.googleapis.com/youtube/v3/videos?key=[MY-API-KEY]&part=id%2Csnippet',
          'part' => 'id,snippet',
          'eventType' => 'upcoming',
          'type' => 'video',
          'subdomain' => 'www',
          'default_embed_width' => '560',
          'default_embed_height' => '315',
          'default_ratio' => 1.77777777777777767909128669998608529567718505859375,
          'embed_code' => '				<div id="wpYouTubeLive"></div>
   
       					var wpYTPlayer;
       					function onYouTubeIframeAPIReady() {
       						wpYTPlayer = new YT.Player(\'wpYouTubeLive\', {
       							videoId: \'\',
       							playerVars: {
       								\'autoplay\': 0,
       								\'rel\': 1							},
       							events: {
       								\'onReady\': wpYTonPlayerReady,
       								\'onStateChange\': wpYTonPlayerStateChange
       							}
       						});
       					}
   
       			',
          'embed_autoplay' => 'false',
          'embed_width' => '720',
          'embed_height' => '405',
          'show_related' => 'false',
          'live_video_id' => NULL,
          'live_video_title' => NULL,
          'live_video_description' => NULL,
          'live_video_publishedAt' => NULL,
          'live_video_thumb_default' => NULL,
          'live_video_thumb_medium' => NULL,
          'live_video_thumb_high' => NULL,
          'resource_type' => 'live',
          'uploads_id' => NULL,
          'channel_title' => NULL,
          'completed_video_id' => '',
          'resource' => 'videos',
       ))
        -->
       ```
   
    -  This topic was modified 3 years, 11 months ago by [GermanKiwi](https://wordpress.org/support/users/germankiwi/).

The topic ‘Plugin error “missingRequiredParameter” on front end’ is closed to new
replies.

 * ![](https://ps.w.org/wp-youtube-live/assets/icon-256x256.png?rev=2711798)
 * [WP YouTube Live](https://wordpress.org/plugins/wp-youtube-live/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-youtube-live/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-youtube-live/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-youtube-live/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-youtube-live/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-youtube-live/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [GermanKiwi](https://wordpress.org/support/users/germankiwi/)
 * Last activity: [3 years, 11 months ago](https://wordpress.org/support/topic/plugin-error-missingrequiredparameter-on-front-end/)
 * Status: not resolved