title: Yii2 Youtube Analytics get channel report - Required Error Getting
body: <p>Using google SDK I am getting the youtube channel id access_token successfully, but I want more details from youtube channel, for that, am passing the access token, developer key via Curl but am getting the following error</p>
  
  <pre><code>linslin\yii2\curl\Curl Object
  (
   [response] =&gt; {
   "error": {
   "code": 400,
  "message": "Required",
  "errors": [
    {
      "message": "Required",
      "domain": "global",
      "reason": "required"
    }
  ]
  }
  }
  </code></pre>
  
  <p>Here below my controller Action Code.,</p>
  
  <pre><code>   $curl = new curl\Curl();
          $response = 
                  $curl-&gt;setGetParams([
                      'metrics' =&gt; 'views,averageViewPercentage,comments,likes,dislikes',
                      'key' =&gt; $developer_key,  
                      'channel' =&gt; 'MINE',                          
                      'startDate' =&gt; '2014-05-01',                          
                      'endDate' =&gt; '2018-07-26',                          
                      'access_token' =&gt; $accessToken
  
                  ])
                  -&gt;setHeaders([
                               'access_token' =&gt; 
                // $accessToken    commented this
                   ])
  
            -&gt;get('https://youtubeanalytics.googleapis.com/v2/reports');
     print_r($result); exit;
  </code></pre>