YouTube Analytics response 403 for requests for more than one user -


this client setup

$this->_client = new google_client(); $this->_client->setclientid( $_config['oauth2_client_id'] ); $this->_client->setclientsecret( $_config['oauth2_client_secret'] ); $this->_client->setscopes( array( 'https://www.googleapis.com/auth/youtube', 'https://www.googleapis.com/auth/yt-analytics.readonly' ) ); $this->_client->setaccesstype( 'offline' ); $this->_client->setredirecturi( filter_var( $_config['oauth2_redirect_uri'] ),  filter_sanitize_url );   $this->_analytics = new youtubeanalyticsclient( $this, $this->_client ); 

i make each user signed in system

$this->_analytics->setchannelid( $_usr_yt_channel_id ); $this->_analytics->setstartdate( $_period[0] ); $this->_analytics->setenddate( $_period[1] ); 

i have not getting such response first sign in user

2014-06-27 12:39:48 exception: error calling https://www.googleapis.com/youtube/analytics/v1/reports?ids=channel%3d%3ducozb0e-9pd6o7bphd-tu2na&start-date=2014-06-15&end-date=2014-06-25&metrics=views&dimensions=country&filters=video%3d%3dftqqlcm5u1u&sort=-views&quotauser=ucozb0e-9pd6o7bphd-tu2na: (403) forbidden 2014-06-27 12:39:51 exception: error calling https://www.googleapis.com/youtube/analytics/v1/reports?ids=channel%3d%3ducozb0e-9pd6o7bphd-tu2na&start-date=2014-06-15&end-date=2014-06-25&metrics=viewerpercentage&dimensions=agegroup&filters=video%3d%3dftqqlcm5u1u&sort=agegroup&quotauser=ucozb0e-9pd6o7bphd-tu2na: (403) forbidden 

removing "quotauser" doesn't change anything.


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -