I am not struggeling with code or syntax. I think I simply don’t understand how to get my calendar events using oauth. All ist coded in PHP8.0.
What I want:
I have a client-PC thats displays my google calendar events. The client-PC displays a website running on my synlology webserver. This webserver gets the Events via Oauth2 from my calendar via google api.
SO:
- Client-PC in my local network –> go to http://192.168.1.2/Info/getInfo.php
- Webserver in local Network(192.168.1.2) –> get information from google calendar (Oauth, type = Web application)
Achievments: I successfully got the calendar events using oauth clientid, type webapplication on my desktoppc. The redirect-url is localhost. So running my website on my local webserver on my desktop pc is no problem.
My Problem:
I cannot copy the files to my synology webserver because of the redirect url “localhost”. localhost points (of course) to the client-PC. But i cannot register something like http://192.168.1.2 as redirect URL in the google cloud console.
I know there are multiple ways to get a token to get my events but honestly speaking I don’t know what would be the best way for my case. It would be great getting a simple example.
thank you