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.
Asked
Active
Viewed 711 times
0
-
2Would you mind to share the code you have tried? – Ivnhal Aug 12 '18 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: https://developers.google.com/calendar/ – Isaac Aug 12 '18 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 = 'https://www.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 https://stackoverflow.com/questions/16970917/why-is-google-calendar-api-oauth2-responding-with-insufficient-permission/16971523 – Wo997 Aug 12 '18 at 18:59
-
@IvnH you can see my answer – Wo997 Aug 12 '18 at 19:04
1 Answers
1
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?

Tomáš Pánik
- 556
- 1
- 5
- 18
-
The reason was that I used the old version of google/apiclientm, I updated it to ^2.0 and now it works – Wo997 Aug 12 '18 at 18:50