I am trying to fetch my calendar events using the google calendar API. But it is giving me error for `dailyLimitExceededUnreg`. But actually i have full limit available. Please help me to get rid from this error.
Fatal error: Uncaught exception 'Google_Service_Exception' with message '{ "error": { "errors": [ { "domain": "usageLimits", "reason": "dailyLimitExceededUnreg", "message": "Daily Limit for Unauthenticated Use Exceeded. Continued use requires signup.", "extendedHelp": "https://code.google.com/apis/console" } ], "code": 403, "message": "Daily Limit for Unauthenticated Use Exceeded. Continued use requires signup." } } ' in /home/grabbanddurando/public_html/gdapp/google-api-php-client-2.2.1/src/Google/Http/REST.php:118 Stack trace: #0 /home/grabbanddurando/public_html/gdapp/google-api-php-client-2.2.1/src/Google/Http/REST.php(94): Google_Http_REST::decodeHttpResponse(Object(GuzzleHttp\Psr7\Response), Object(GuzzleHttp\Psr7\Request), 'Google_Service_...') #1 [internal function]: Google_Http_REST::doExecute(Object(GuzzleHttp\Client), Object(GuzzleHttp\Psr7\Request), 'Google_Service_...') #2 /home/grabbanddurando/public_html/gdapp/google-api-php-client-2.2.1/src/Google/Task/Runner.php(176): call_ in /home/grabbanddurando/public_html/gdapp/google-api-php-client-2.2.1/src/Google/Http/REST.php on line 118 > Code i am using is: > > define('APPLICATION_NAME', 'Google Calendar API PHP Quickstart'); > define('CREDENTIALS_PATH', > 'google-api-php-client-2.2.1/credentials/client_idd.json'); > define('CLIENT_SECRET_PATH', > 'google-api-php-client-2.2.1/credentials/client_idd.json'); > define('SCOPES', implode(' ', array( > Google_Service_Calendar::CALENDAR_READONLY) > )); > function getClient() { > $client = new Google_Client(); > $client->setAuthConfig(CREDENTIALS_PATH); > $client->setApplicationName(APPLICATION_NAME); > $client->setScopes(SCOPES); > return $client; > } > > /** > * Expands the home directory alias '~' to the full path. > * @param string $path the path to expand. > * @return string the expanded path. > */ > function expandHomeDirectory($path) { > $homeDirectory = getenv('HOME'); > if (empty($homeDirectory)) { > $homeDirectory = getenv('HOMEDRIVE') . getenv('HOMEPATH'); > } > return str_replace('~', realpath($homeDirectory), $path); > } > > // Get the API client and construct the service object. > $client = getClient(); > //echo "<pre>"; print_r($client); echo "</pre>"; exit; > $service = new Google_Service_Calendar($client); > > $events = $service->events->listEvents('primary'); > > while(true) { > foreach ($events->getItems() as $event) { > echo $event->getSummary(); > } > $pageToken = $events->getNextPageToken(); > if ($pageToken) { > $optParams = array('pageToken' => $pageToken); > $events = $service->events->listEvents('primary', $optParams); > } else { > break; > } > } > print_r($events); -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and Google+: https://googleadsdeveloper.blogspot.com/ https://plus.google.com/+GoogleAdsDevelopers/posts =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ You received this message because you are subscribed to the Google Groups "AdWords API Forum" group. To post to this group, send email to adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/adwords-api?hl=en --- You received this message because you are subscribed to the Google Groups "AdWords API Forum" group. To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscr...@googlegroups.com. Visit this group at https://groups.google.com/group/adwords-api. To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/0c26438e-0594-4bd8-88ee-f84d43bb9a03%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.