Google Calendar API Tutorial | Connect Calendar With PHP | Display And Add Events | 2019
Google added one extra step before downloading credentials.json. Click on link below to fill the missing step.
https://youtu.be/5COjnEc4d9E
Download VENDOR Folder (Only for PHP version 7.2+):
https://unpossiblepog.com/research-and-development/php/Vendor-Folder-For-Google-Sheet-Drive-Calendar-With-PHP-Version-7.2-And-Onward
Enable GOOGLE CALENDAR:-
https://calendar.google.com/calendar/
Install LUBUNTU, XAMPP & SUBLIME TEXT:-
https://youtu.be/X09awd5Q8Bk
Install Composer (In windows):-
https://www.youtube.com/watch?v=BGyuKpfMB9E
Install Composer (In LINUX):-
sudo apt install composer
Connect Calendar With PHP:-
https://developers.google.com/calendar/quickstart/php
Insert Event:-
https://developers.google.com/calendar/v3/reference/events/insert
------------------------------------------------
Let’s get started.
Open up the browser, and search for “Google Calendar quickstart php”.
Go to the link or link is in the description.
Then we need to enable “Google calendar ”. Click on the button, it will automatically enable it for us.
What we actually need is “credentials.json” file, so download it.
Now go to downloaded location, create a new folder in htdocs folder inside xampp, give it any name. Then paste “credentials.json” file in it.
Now, open that folder in terminal, and paste the command that they provided. Hit ENTER.
It may take several minutes because it is downloading lot of files from google server. Have patients.
Now we are good to go.
Next is to copy the code, create a file inside “API” folder, create a new file with any random name. Paste that sample code. the close php tag.
Here, they made some code which is not ready to go. So copy that DIR line, and paste it before “credentials.json” somewhere at line 17.
Now in terminal, make sure that, we are at same location where “quickstart.php” is.
Run the file by typing command “php quickstart.php”.
Oops, I forgot to give forward slash. My bad.
Rerun it, now it asks for varification code. So copy the link above that line.
Paste it in “Browser’s URL.” Hit enter.
Sign in, it is preventing you, just click on “Advanced” then click on “ Go To quickstart(unsafe)”.
Now notice that line says “View Your Calendar”. It means we only have an access to view calendar. Allow it.
Now, they provide you the verification code, copy it, paste it for backup and paste it in “terminal”.
Now the output says, “No Upcoming event found” because we didn’t create any events yet.
So go to google, search for “google calendar”, click on this link.
You will see your calendar.
Now you notice that red line which is the current time, I shall make two events. 1 before the red line and 1 after the red line.
Now, lets rerun it.
You will see, that that it is showing the upcoming event but not past event.
Before that, we shall make run it on browser.
When, we run it on browser, it doesn’t allow you to.
It shows the error :-
“Fatal error : Uncought Exception: This application must be run on command line”
So just comment those lines. and refresh the page.
And boom, your code is now connected with browser.
If you want all events. Then we shall first check the output of date(c).
We shall copy that and change date to 0000-01-01.
Now we are getting all results.
If you observe, thare are several attributes of each event like description, timezone etc.
So for that, there are functions available. We shall receive the description of each event by call getDescription() function.
Now lets add some events, shall we?
Open browser, search for “insert calendar event API”. Search for “PHP”.
Copy this code, and paste it within our code.
You can paste it at the end of code if you want to. But you must paste it somewhere below “events” variable.
Now, they instructed us to change the scope to CALENDAR.
So Copy-paste it above.
Now, the next instruction is incorrect. We don’t have to delete “credentials.json” file.
Open, “token.json” and remove ”.readonly“ from scope variable.
Now it is giving me the error called “insuffucientPermission”. Which is obvious.
Error goes like this:-
...............{
Fatal error: Uncaught Google_Service_Exception: { "error": { "errors": [ { "domain": "global", "reason": "insufficientPermissions", "message": "Insufficient Permission: Request had insufficient authentication scopes." } ], "code": 403, "message": "Insufficient Permission: Request had insufficient authentication scopes." } }
}.................
Now delete “token.json”. Make sure to have backup of it.
Now, lets rerun it but on terminal.
Now they are asking for verification code, “paste that link in browser”. They are telling us that “Now you are having access such as edit, delete, add in google calendar.”
Make sure that they are checked.
Copy the verification code, and paste it in terminal.
Now it says that “event is created. But in 2015”
I shall delete it for now.
And I shall make count as 1, so that “Event will be added one time only.”
Видео Google Calendar API Tutorial | Connect Calendar With PHP | Display And Add Events | 2019 канала Unpossible POG
https://youtu.be/5COjnEc4d9E
Download VENDOR Folder (Only for PHP version 7.2+):
https://unpossiblepog.com/research-and-development/php/Vendor-Folder-For-Google-Sheet-Drive-Calendar-With-PHP-Version-7.2-And-Onward
Enable GOOGLE CALENDAR:-
https://calendar.google.com/calendar/
Install LUBUNTU, XAMPP & SUBLIME TEXT:-
https://youtu.be/X09awd5Q8Bk
Install Composer (In windows):-
https://www.youtube.com/watch?v=BGyuKpfMB9E
Install Composer (In LINUX):-
sudo apt install composer
Connect Calendar With PHP:-
https://developers.google.com/calendar/quickstart/php
Insert Event:-
https://developers.google.com/calendar/v3/reference/events/insert
------------------------------------------------
Let’s get started.
Open up the browser, and search for “Google Calendar quickstart php”.
Go to the link or link is in the description.
Then we need to enable “Google calendar ”. Click on the button, it will automatically enable it for us.
What we actually need is “credentials.json” file, so download it.
Now go to downloaded location, create a new folder in htdocs folder inside xampp, give it any name. Then paste “credentials.json” file in it.
Now, open that folder in terminal, and paste the command that they provided. Hit ENTER.
It may take several minutes because it is downloading lot of files from google server. Have patients.
Now we are good to go.
Next is to copy the code, create a file inside “API” folder, create a new file with any random name. Paste that sample code. the close php tag.
Here, they made some code which is not ready to go. So copy that DIR line, and paste it before “credentials.json” somewhere at line 17.
Now in terminal, make sure that, we are at same location where “quickstart.php” is.
Run the file by typing command “php quickstart.php”.
Oops, I forgot to give forward slash. My bad.
Rerun it, now it asks for varification code. So copy the link above that line.
Paste it in “Browser’s URL.” Hit enter.
Sign in, it is preventing you, just click on “Advanced” then click on “ Go To quickstart(unsafe)”.
Now notice that line says “View Your Calendar”. It means we only have an access to view calendar. Allow it.
Now, they provide you the verification code, copy it, paste it for backup and paste it in “terminal”.
Now the output says, “No Upcoming event found” because we didn’t create any events yet.
So go to google, search for “google calendar”, click on this link.
You will see your calendar.
Now you notice that red line which is the current time, I shall make two events. 1 before the red line and 1 after the red line.
Now, lets rerun it.
You will see, that that it is showing the upcoming event but not past event.
Before that, we shall make run it on browser.
When, we run it on browser, it doesn’t allow you to.
It shows the error :-
“Fatal error : Uncought Exception: This application must be run on command line”
So just comment those lines. and refresh the page.
And boom, your code is now connected with browser.
If you want all events. Then we shall first check the output of date(c).
We shall copy that and change date to 0000-01-01.
Now we are getting all results.
If you observe, thare are several attributes of each event like description, timezone etc.
So for that, there are functions available. We shall receive the description of each event by call getDescription() function.
Now lets add some events, shall we?
Open browser, search for “insert calendar event API”. Search for “PHP”.
Copy this code, and paste it within our code.
You can paste it at the end of code if you want to. But you must paste it somewhere below “events” variable.
Now, they instructed us to change the scope to CALENDAR.
So Copy-paste it above.
Now, the next instruction is incorrect. We don’t have to delete “credentials.json” file.
Open, “token.json” and remove ”.readonly“ from scope variable.
Now it is giving me the error called “insuffucientPermission”. Which is obvious.
Error goes like this:-
...............{
Fatal error: Uncaught Google_Service_Exception: { "error": { "errors": [ { "domain": "global", "reason": "insufficientPermissions", "message": "Insufficient Permission: Request had insufficient authentication scopes." } ], "code": 403, "message": "Insufficient Permission: Request had insufficient authentication scopes." } }
}.................
Now delete “token.json”. Make sure to have backup of it.
Now, lets rerun it but on terminal.
Now they are asking for verification code, “paste that link in browser”. They are telling us that “Now you are having access such as edit, delete, add in google calendar.”
Make sure that they are checked.
Copy the verification code, and paste it in terminal.
Now it says that “event is created. But in 2015”
I shall delete it for now.
And I shall make count as 1, so that “Event will be added one time only.”
Видео Google Calendar API Tutorial | Connect Calendar With PHP | Display And Add Events | 2019 канала Unpossible POG
Показать
Комментарии отсутствуют
Информация о видео
Другие видео канала
Google Calendar & LaravelService account authentication with Google API using a PHP LibraryThe Notion API | Using Python to access your Notion workspaceJquery Fullcalandar Integration with PHP and MysqlCreate Google Calendar Event | Google Calendar Integration | MVC Application | Part - 4Embed Google Calendar On Your Site Quickly And EasilyCreate Meeting with ZOOM API and PHPAzure SAML 2.0 With PHP Login API | SimpleSAMLPhp | Creating Your Own Enterprise ApplicationWhatsApp Business API: How it Works 🧐Python Google Sheets API Tutorial - 2019Get Access Token and Refresh Token | Google Calendar Integration | MVC Application | Part - 2Google Calendar API with NodeJS | Step by Step | Create, List, & Delete Google Calendar EventsCalendar Event in PHP with Source Code 2021Creating events in Google Calendar (100 Days of Google Dev)Google Calendar Api with PHP(Laravel)google calendar || full tutorial || create events (hindi) #10HTACCESS + PHP | Forcefully Add Ending Slash (/) In URL On Rewrite Rule | ErrorDocumentJava Google Calendar API | Part 1 | Linux Terminal & Gradle Groovy | Display EventsHow To Use The Google Calendar API In Node.jsCrear eventos en google calendar con php