There is SO MUCH information about google APIs. So I'm getting lost in all the research.
My goal:
I have a spreadsheet under my google docs account. I want to run a cron job every day, pull cell values from a specific cell (it increases to the next row each day) and then do some other API calls to other services, then write the results in another column in that same row.
Most of the oAuth 2.0 stuff needs to ask the user, which can't happen in a cron job. I found something about a service account, but thats a whole new type of account, and it seems to have it's own credentials. I already have 4 types of security credentials created.
Question) How do I authenticate my google account in PHP without asking anything to the user?
The URL I want to use with cURL after authentication is this
https://spreadsheets.google.com/tq?tqx=out:json&tq=<QUERY>&key=<MY KEY>
Thanks to anyone who can help!
Related
I have an application which connect two different APIs & built on the Codeignitor3 PHP framework. Below is the flow.
User register with us.
Users add API key for both the API's platform.
We sync products & order from one API to other API.
Now the questions are:
I need this to be automated, for that I have added a CRON JOB to achieve this & for 1 - 10 users it is working fine.
I want to know the best approach to sync data automatically when My application has more than 500 users. Please note that I need to sync data once a hour per each user.
There are no Webhooks provided so I need to work with API's only.
I am not able to find a suitable and best approach for this So I am posting here.
Kindly suggest
You must give a try of AWS Lambda Service.
I have a Laravel 5 project and I create event on google calendar with larvael-google-calendar.
I need to create reminder but not reminder of an event (so not the notifications to remind an event). The reminder you can create on Google calendar.
This :
Which look like this after created :
And not this
But I don't find anything on it, when I research I always find results concerning the reminder like a notification.
Anybody know how to create it with the API or another method (PHP of course)? (I don't care if I need to remove my package, just want a solution).
I have actually looked around for this for a long time. This is the conclusion i have come to.
The reminders you are speaking of arnt actually part of Google Calendar they are more part of your full Google account as far as i have been able to tell.
You can for example create a reminder though the Google assistant, Google Calendar android app and the Gmail android app as far as i have seen so far.
It appears that this works across multiple applications there for IMO this is not directly part of Google calendar and thats why we cant seem to find an option for adding remainders from within the Google Calendar api.
I think we will have to wait for Google to release a new API for this.
I am integrating the Twitch user account API into my platform and had a look through the API to see if there was a callback section of some sort to send an update to my server when a user starts streaming, but I can't seem to find any reference for one.
Is there currently any services that offer this sort of thing? If not, what would be the best way of running regular checks on all of my users in my Database to see when they are streaming, of course doing this alone would kill the server with database queries, so I'm stuck as to where to go now.
What I am looking to do is receive a callback and then create a post in a social feed that the user has started streaming.
Based on the discussions at the links below, the API doesn't support webhooks and won't anytime soon. Instead, they expect you to use polling. Basically you would set up a worker process that makes requests periodically, such as every five minutes, then creates appropriate social feed posts, etc. You can batch them together if you have a bunch of channels to check (exaple from from the github issue):
https://api.twitch.tv/kraken/streams?channel=riotgames,dota2ti,machinima,esltv_hearthstone
https://github.com/justintv/Twitch-API/issues/211
https://discuss.dev.twitch.tv/t/notifications-using-twitch-api-and-php/1009
I have a question regarding the creation of event invites by a facebook application, and the ability to invite the users who have approved that applications permissions to this event.
For example, we are a local nightclub who have an app allowing users to connect with the app to see who else is attending events etc, and keep up to date with information about the events we host. It would be ideal to be able to send an event invite to these users when we have special events or theme nights.
Currently the app has around 10,000 approved users.
Just really looking to find out if this is at all possible with the new open graph api? In particular the info provided at:
Event API Reference
How To Use the Graph API to Manage Events
There does seem to be some confusion over what these posts say can be achieved, and what actually can be achieved.. unless those that I have previously spoken to are still basing their opinions on the old rest api.
Clarification and pointers appreciated!
The HTTP POST if you use the ?users= can only handle so many IDs before the length of the url overruns. Since it's a post, you can specify the users parameter and then a comma separated list of ids for the value. Try it out here: http://developers.facebook.com/tools/explorer?method=GET&path=me
I am creating a php website that uses the Google Calendar API. It's working fine with Create, Update and Delete: any event from the PHP website goes into my Google Calendar events after login.
Events created on my site are created in Google Calendar.
What I want now that is: when I create an event from my test page it goes into Google Calendar after login, then if I update or delete that event from Google Calendar then it should automatically update or delete the php website event.
Basically: 1-way sync is working fine but now I want 2-way synchronization.
If anybody has any ideas then kindly share with me, it will be much appreciated.
There are no application hooks in Google Calendar (gCal) that allow you to trigger an action when an event is deleted. Instead you must either poll gCal at intervals (this could be a cron job every few minutes/hours) and update your calendar accordingly, or any time you perform an action from your calendar have a 1 in X possibly of a full re-sync.
This implies that you are using the gCal as the definitive source, and mirroring those changes back to your local application.
well, after following these answers and building a hole 2 way sync process,
i realized there's a push notifications for calendar since 2013.
you will still need a full sync process because the push notification only notifies about a change but no data about the change.
hope it will save you some time.
Push Notifications
Would it not be an option for your system to generate an iCal output at a special, user-specific URL, and then have the user subscribe to that calendar in Google Calendars (or their iCal-reading calendar of choice)?
That way, your system would always hold the authorative calendar, and Google Calendar would reflect any changes you make automatically.
Alternately, if you are wanting changes in the Google Calendar to be reflected in your application, then you may be able to subscribe to iCals for the User's Calendar, and then poll them at a regular interval to reflect any changes the User has made at that end.
I would lean towards the first option (your iCal subscribed through Google Calendar), as it is a simpler and easier solution.