I\'m trying to make some analytics query from server to server. I\'m using laravel with https://github.com/google/google-api-php-client library.
This is the code I
You need to add a Google API key
https://www.googleapis.com/youtube/analytics/v1/reports?ids=channel%3D%3DMINE&start-date=2014-05-01&end-date=2014-06-30&metrics=views%2CestimatedMinutesWatched&dimensions=day&sort=day%2Cviews&key={YOUR_API_KEY}
also if you look at your string you have type error on the end where "-views" should be just "views" without dash You can use Google automated tool to generate a valid link.
https://developers.google.com/youtube/analytics/v1/
I tested your query and it's working fine, but apparently YouTube does not support service accounts. The documentation says it should return a 403
in this case, but for some reason it's returning 400
.