Why can't I delete native events with Cronofy.com? - api

I am using Cronofy to integrate my application (only locally tested yet) with multiple calendar platforms.
I am having trouble getting it to update or delete events which are created natively (google or outlook) and I cannot understand why. The documentation (https://www.cronofy.com/developers/api/) is not sufficing to understand it and there's not much more out there besides that.
When I send a request for deletion of a native event I do get a 202 HTTP response back but the event remains in my google/outlook calendar and if I do the same for my own event it deletes there smoothly with the same 202.
How can I make it work? I've read about auth flow and that 202 means it is processing but this processingtime seems to be taking too long for it to be that (~2days)

As standard, we sandbox calendar access and don't allow developers to edit existing events in end-users calendars.
There is a process you can go through to request extended permissions on one or more of a user's calendars if you need this functionality. Let me know via the support#cronofy.com if you would like access to this.
We differentiate between 'managed' and 'unmanaged' events in our API to help streamline the kinds of operations different use cases require.
Managed events are events that are created by your application. When they are created we require an event_id which is your id for the event in your application. You have complete control over events with an event_id. In order to delete a managed event you would pass the event_id as the identifying parameter https://www.cronofy.com/developers/api/#delete-event
Unmanaged events are events created by the user in their calendar. These have an event_uid which is used to identify the event. If you have sufficient permission to delete unmanaged events then you would pass this event_uid as the identifying parameter.
The reason we're returning a 202 is that our API is asynchronous. Every API request is a journal operation which is executed by a worker. We don't inline calls to downstream APIs. Instead we protect your application performance from having to deal with whether a calendar server is available and responsive to meet your request.
I hope this helps explain what you're seeing. Any questions, let me know either hear or at support#cronofy.com.
Adam

Related

Assigning webhooks to Firebase Messaging "subscribe to topic" event

In my current project I am using the Kreait Firebase PHP SDK to send out push notifications to Android & iOS devices that have subscribed to notifications on named topics. No issues thus far. However, rather than have fixed topic names I would now like to generate topic names based on the current "condition" of the connecting device. The condition could, for example, be a geographic location.
This is not too difficult either and I have modified my app to handle this. However, in order to put the ability to have such autogenerated topics to use I need to know the topic names on my server so I can send out targeted messages via Kreait. I find Google's Firebase documentation a bit dense at times and have not been able to establish whether it is possible to assign webhooks that get called by Firebase whenever a SubscribeToTopic, UnsubscribeFromTopic event occurs.
A simple question - does FCM even offer anything like this capability? If so, any pointers to the relevant documentation would be much appreciated.
There is no public API to get a list of topic names from Firebase, nor is there a way to hook into the subscription mechanism.
Your best bet is to simply make two calls when a user subscribes to a topic: one to Firebase, and one to your own backend API that keeps a list of active topics/conditions.

Using Google Calendar Web API to dynamically create events on (company) calendar?

I've reviewed the Google Calendar API docs and having trouble finding information on creating events on a predefined calendar.
The Browser Quickstart docs worked just great to get up and running by authenticating use of my calendar. However, do you have advice on how to allow users to create events on a predefined calendar?
Use case:
We have a couple web forms for users (leads) to complete. When certain criteria have been met, we'd like to pass details from the web form to a Google Calendar event on our company calendar.
User completes web form which includes a handful of questions, namely two date/time pickers
On form submission, deliver form values to Google Calendar API - create event dynamically using information submitted in the form
Standard calendar functionality happens; notifications, etc. generated from Google Calendar
More clarification:
Users don't need view access to the calendar
The calendar integration is irrelevant to users, they're just submitting a contact form
It appears the only required event fields are start and end time so that's easy enough to grab from a date picker I'm just lost on how to engineer the connection to our company calendar named e.g. "User Created Events".
I know this can be done with Zapier. I'd like to learn the correct way though.
Based from Calendar API Sharing and Attendees:
There are two different ways to share calendar and event data with
others.
Firstly, you can share an entire calendar, with a specified level of
access. For example, you can create a team calendar, and then do
things like:
Grant all members of your team the right to add and modify events in the calendar
Grant your boss the right to see the events on your calendar
Grant your customers the right to only see when you are free or busy, but not the details of the events
You can also adjust the access to individual events on the shared
calendar.
You can share with somebody a specific created event on a calendar using google api by going through ACL - access control list.
I use Zapier for my organization to complete the exact same scenario. Ideally the webform service you use has a built in integration with Zapier, otherwise there will be some coding involved to have this work.
Assuming your webform service has an integration with Zapier:
Trigger Event: There is likely a trigger scenario along the lines of "execute zap on submission of new record". Upon this trigger activating, depending on how your webform service sends data, you will likely receive a list of values corresponding to the data entered.
Optional Action: Depending on the consistency of the data being entered through the webform you may want to also consider adding a step using the Zapier code module. The code module allows you to take the data gathered during the trigger event and manipulate it as you see fit (I personally use this step to check that data was entered correctly). That said it is an advanced step and does require some coding experience in either javascript or python. See the Python documentation here and the Java documentation here.
Google Calendar Action: If you haven't already you will be required to authorize Zapier's access to read and write to your calendar. Zapier makes this pretty straight forward. Click the "connect account" button and a dialog window will appear asking you to log into your gmail account. After you have connected your account you can then setup your template. Using the drop downs within the template you can select what data you would like to be entered into each field. Assuming everything went correctly then you should see the information added to your calendar.
See the documentation here for further explanation.
Assuming your webform service does not have an integration with Zapier:
This is a bit trickier and will be dependent on the whether or not your webform service allows you to make POST requests based on the entering of new forms. This will as well require a good deal more programming to get up and running. Not knowing the platform you are using to capture user input forces me to make a lot of assumptions.
So assuming your webform platform has the ability to make POST requests with the data from a newly entered record, or allows you to program it to do so, you could use Zapier's webhook module as a trigger. See Zapier's webhook documentation here.
For this to work you would have to start by creating a webhook endpoint through Zapier. The endpoint is just a url that is waiting to receive data sent to it from an outside source, in this case your webform platform.
The zap template would look as follows:
Trigger Event: POST request data caught by Zapier webhook endpoint. Once the data is captured it can be used in the same way you would with a standard zap. That is to say that the data, in the form of key/value pairs, will now be populated in Zapier's drop down list you use to move information from one step to the next.
Optional Action: Once again you can leverage Zapier's code module to apply logic to the captured data.
Google Calendar Action: Same as the "Google Calendar Action" listed above.
Edit:
In re-reading your question I realize that you are looking to achieve this without using zapier. I will leave this answer up for the time being, as perhaps it will have some value to you. If not I can remove it.

Events sent via Google Analytics Hit Builder not showing up

I am looking to send hits to our Google Analytics account from our server-side REST application. It seems this is possible by constructing a POST request based on the format at https://ga-dev-tools.appspot.com/hit-builder/
However, multiple attempts at sending test hits have failed. I have tried sending tests from within Hit Builder as well as via cURL. I've confirmed our TID (Tracking ID) is correct and the URL and parameters validate properly in Hit Builder.
Any tips appreciated!
Don't know if this information helps concerning the Google Analytics Measurement Protocol (validating hits)
https://developers.google.com/analytics/devguides/collection/protocol/v1/validating-hits
I remain a little confused by this bit:
"Important: hits sent to the Measurement Protocol Validation Server will not show up in reports. They are for debugging only."
I guess besides the Reports, you can still see the Events getting fired off in real-time, they don't get reported/recorded, that's all.
Just some example usage for a Google Analytics account that I set up, (for a mobile app). I first constructed an example Event-type hit. Checked that it liked it. And then fired it off to Google Analytics:
And then over in the Google Analytics account, navigate to Real-time > Events and take a look:
This is probably quite late for your purpose given that the OP was made in 2016, but I'm posting so that it could help anyone else with the same question. Here's one likely scenario (happened to me):
You are sending hits to GA from a location that you set IP filtering for under GA property >> View Settings. In that case GA will not show these hits. If you are indeed firing the hits from a blocked IP, then for testing purposes, either try using a VPN, or else create a new Test-View with no IP filter and check if the event shows up in that GA view.
A little late but I encountered with this issue and I had two elements blocking the event from the Master view. Events registered good on All data view so I had to check filter by flter on my Master view. I had Carlos SEO's filters implemented and turns out the ISP Provider Bots 2 filter leaves out your event hits.
The second thing blocking my event was the "Exclude all hits from known bots and spiders" checkbox on the view settings; I had it checked.
Hope this helps anyone who has the same issue :)

How to get notification subscriptions in Worklight

I want to trigger VERY basic push notifications, but, don't see any way to iterate through all the subscribed users, without rolling my own tool to read the db notification_user table. Surely, with such an extensive (and expensive) product such as Worklight there is an API to do this?
The only way I see is within my adapter to call another HTTP adapter (go get the user subscriptions). And, I've tried using the HTTP interface to retrieve the subscribed users via:
http://<server:port>/<context>/console/api/push/get?adapterName=PushAdapter&eventSource=EventSource
and many variations, but, nothing seems to work through browser testing (the doc indicates all are GET requests). There are NO examples of how the "Push, Event Sources" (?) format for the api is (should the "API Context" value be "Push", or "EventSources", what?). The chart given in the Worklight 6.0 Information Center is pretty bare minimum (how difficult would it have been to include an example of each?)
Basically, I want to iterate through a specific adapter/event source in a WL adapter, grab the "options" that were passed in when the user subscribed to perform some business logic on whether to send out a notification. Would think this would be a very common pattern, but, don't see any examples of this type of model.
Anyone have suggestions for similar processing with WL 6?
Thanks.
You're not wrong. Worklight has 3 methods to send out notifications to subscribed users/devices
See
WL.Server.notifyAllDevices
WL.Server.notifyDevice
WL.Server.notifyDeviceSubscription

Wufoo: update entry using API

Using Wufoo's API, is it possible (and if so how) to retrieve a single entry and update the information in it (without submitting it as another entry)? I can't seem to find any information on the Wufoo API website. If this isn't possible, any suggestions as to to work around this (such as using a local db). I'd like to build a hybrid app that authenticates locally and uses Wufoo for the data collection.
Thanks :)
I've been working on a similar kind of project and ran into the same issue. After submitting a help ticket, I was informed that the wufoo API does NOT support this function (update). Any updates would have to be done externally.
Like you, I would like to store my data in wufoo rather than externally, so I'm working on a few scripts that will serve as webhook endpoints for my wufoo forms. Whenever a form is submitted, one of these scripts will receive that data, do stuff with it, then use the API to relay the modified data back to a second wufoo form that "shadows" the original (same fields if needed, or new fields that reflect the processing I did).
This second set of forms would be the final destination for the data and only be accessed by my code. The first set of forms would only be accessed by live users. In a nutshell, it's a huge feedback loop that uses webhooks to trigger the processing.
Hope this helps.
for more info on webhooks, see http://help.wufoo.com/articles/en_US/SurveyMonkeyArticleType/Webhooks?q=webhook&fs=Search&pn=1
for more info on the wufoo api Entries api (get & post), see http://help.wufoo.com/articles/en_US/SurveyMonkeyArticleType/The-Entries-API