i having trouble adding events google calendar. can list events when try add event getting 403 forbidden error. able add events primary, when try one, in case 1 i've mnetion, run 403 forbidden error. here code have: require_once 'vendor/autoload.php'; define('application_name', 'calendar'); define('credentials_path', 'credentials/calendar.json'); define('secret_path', 'secret.json'); define('scopes', implode(' ', array(google_service_calendar::calendar))); function getclient() { $client = new google_client(); $client->setapplicationname(application_name); $client->setscopes(scopes); $client->setauthconfigfile(secret_path); $client->setaccesstype('offline'); $credentials_path = credentials_path; if (file_exists($credentials_path)) { $access_token = file_get_contents($credentials_path); } else { // $auth_url = $client->createauthurl()...
Comments
Post a Comment