After hours of work I am stuck with using google calendar php api, I need the basic functionality, reading and adding events (updating and removing later), any advice? I need the solution that works with the recent version of the api and is relatively simple.
-
2Would you mind to share the code you have tried?Ivnhal– Ivnhal2018-08-12 18:17:10 +00:00Commented Aug 12, 2018 at 18:17
-
There's really clear and concise documentation for this API, to do something as simple as this follow the guides and give it a go, if you get stuck try to research first before asking on here. Documentation: developers.google.com/calendarIsaac– Isaac2018-08-12 18:36:43 +00:00Commented Aug 12, 2018 at 18:36
-
I am having problem with inssuficient permission, I have seen the answer "launch a Python program which looks like the Google's quickstart program with written in " SCOPES = 'googleapis.com/auth/calendar' ". This program was the only solution that worked for me. Launch my django command to call my real work did not work for me. But this fixed my permission problem." but what python program is that? I copied this answer from different topic stackoverflow.com/questions/16970917/…Wo997– Wo9972018-08-12 18:59:21 +00:00Commented Aug 12, 2018 at 18:59
-
@IvnH you can see my answerWo997– Wo9972018-08-12 19:04:26 +00:00Commented Aug 12, 2018 at 19:04
1 Answer
Everything you need is well documented on Google Developers website. You will need composer to be running in your project and a Google Account.
On Google Developers page listed above, click Enable the Google Calendar API, select existing project or create a new one and click next. You will get your Client ID and unique Client Secret. You can manage this credentials in API Dashboard. Download these credentials.json and put them in your workdir.
Then you can setup composer for Google Client Library
composer require google/apiclient:^2.0
Now you can set up the sample. Create a file named quickstart.php and put there this code. You can run the sample using php quickstart.php.
Would you like to share your code with us, so we will be able to support you with more relevant answers?