0

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.

4
  • 2
    Would you mind to share the code you have tried? Commented 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/calendar Commented 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/… Commented Aug 12, 2018 at 18:59
  • @IvnH you can see my answer Commented Aug 12, 2018 at 19:04

1 Answer 1

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?

Sign up to request clarification or add additional context in comments.

1 Comment

The reason was that I used the old version of google/apiclientm, I updated it to ^2.0 and now it works

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.