Youtube Analytics API PHP Invalid query. Query did not conform to the expectations

后端 未结 2 801
-上瘾入骨i
-上瘾入骨i 2020-12-20 08:22

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

2条回答
  •  情歌与酒
    2020-12-20 08:54

    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/

提交回复
热议问题