Jawbone: Registered Webhook not being called - publish-subscribe

I've just started looking at the Jawbone API so please forgive any rookie mistakes.
I've successfully navigated OAuth and I'm now able to pull data from endpoints. I've registered a webhook for my server at https://example.com/webhook.php and I got a success message
{"meta":
{"user_xid": "<redacted>",
"message": "Registered webhook for user",
"code": 200,
"time": 1469983151},
"data": {}
}
However, I can't see the webhook being called at all. None of the code within the script seems to be running, so I've looked in the webserver logs and there are no requests happening in there.
I've tried adding and deleting moods in the app to get something to happen, and tried syncing the jawbone itself and nothing seems to get the webhook to fire.
My API application isn't published (yet), I hope that's not a barrier here, because I want to test thoroughly first. Is there another step I'm missing?
Thanks in advance!

Related

What could be the reason for a Google Action with external endpoint (API) to work on the Actions Console Simulator, but not as deployed?

I am new to the whole creation-process of Google Actions.
I created an Action with the new Action Console.
It has an fulfillment endpoint to my server (as example: www.mypage.com/api).
For testing purposes it has no authentification, so it generates a public API response.
Said API generates a simple JSON response based on a send event handler.
In short: Action onEnter sends handler to API, API queries SQL database and sends the response back to my Google Action that then "speaks" the SQL result.
The result with the Actions Console Simulator is:
Testing with "Smart Display device: everything works.
Testing with "Speaker (e.g. Google Home): everything works.
Testing with "Phone": main intent is invoked and text is shown but does not get spoken.
So i tested the command "Hey Google, talk to the unicorn app" directly on my smartphone.
Here **everything works fine ** as said smartphone has the same e-mail like the one on my Action Console account: it recognizes the main invocation command and when i ask by voice to get the data, the data is received from my server and spoken.
So something is wrong with the "Phone" device in the simulator. This has been confirmed by me from other users saying that they often have trouble with the simulator function correctly.
I then deployed my Action.
It was reviewed and approved.
A few seconds later i received an auto-email saying that there were too many errors with my app, asking me to check its health status. I did so and in the Health tab, i can see that it has an error but it does not show me what the error is.
THEN I CONTACTED A ACTIONS-ON-GOOGLE EXPERT
They helped me a lot into the right direction but could not go deeper into the problem as my connection (the endpoint API) is outside of their servers.
So i ended with their tip on checking the Google Cloud Logging Console.
As said Logging Console is also new for me, i learned on how to query my results but:
How can i query for the so called "is_health_check" flag?
I am asking this because the Google Expert recommended me to search for said flag but i do not know on how to query it.
Sorry for this ultra-long entry but i am trying to be as transparent to you as possible, as i have been trying this out for several days now.
Thanks in advance for your time, ppl!
So the error is simple once that you know how Google handles the external webhooks. Thanks to the help of 2 Actions-On-Google Experts i was informed that Google pings your external Webhook from time to time.
As soon as they get an error as result from said ping, the Action will be deactivated from the Assistant until a new ping response sends that everything is fine again.
My problem was that after deploying the action and while it was under reviews, i continued to work on the code on my server. While coding, the Google server pinged and received an error code.
My fault, but at least i learned the thing about pinging your action!

After successfully subscribing to Microsoft graph notifications with application I receive no notifications

I'm trying to receive notifications from Ms Graph. I want to create background service/daemon which connects to Graph with its own identity.
I'm using developer account. I've successfully created an application in AAD. I've added necessary permissions to my app.
For simplicity I'm using Postman to make REST requests to Graph. I've successfully authenticated with my app via:
https://login.microsoftonline.com/{mytoken}/oauth2/token
And received Authorization token. I can successfully execute Graph queries, like read and write messages of all users.
https://graph.microsoft.com/v1.0/users/93ffed3b-5aec-458c-a5eb-691cd610cd50/messages
I've created 2 subscriptions. And I can see those in a list.
https://graph.microsoft.com/v1.0/subscriptions/
{
"#odata.context": "https://graph.microsoft.com/v1.0/$metadata#subscriptions",
"value": [
{
"id": "67d395ae-0fad-438e-8f23-175dd2b43172",
"resource": "/users/93ffed3b-5aec-458c-a5eb-691cd610cd50/mailfolders('inbox')/messages",
"applicationId": "991ead1f-14b0-4934-a471-c749edcbb352",
"changeType": "created",
"clientState": null,
"notificationUrl": "https://831327fd.ngrok.io/notification/listen",
"expirationDateTime": "2018-12-13T23:00:00Z",
"creatorId": "fc01f0e2-2b2c-4dc1-a18c-75529fb75953"
},
{
"id": "75b01b91-6595-4ce0-98b3-772731071607",
"resource": "/users/93ffed3b-5aec-458c-a5eb-691cd610cd50/messages",
"applicationId": "991ead1f-14b0-4934-a471-c749edcbb352",
"changeType": "created",
"clientState": null,
"notificationUrl": "https://831327fd.ngrok.io/notification/listen",
"expirationDateTime": "2018-12-13T23:00:00Z",
"creatorId": "fc01f0e2-2b2c-4dc1-a18c-75529fb75953"
}
]
}
I'm using ngrok to tunnel requests to my local dev environment.
I've send several emails to an account which I subscribed to in subscriptions. But I've received no notifications.
How can I troubleshoot it? Is there a problem on MS Graph side, was it attempting so send me Notifications Or not? Is there a problem with my account or application configuration?
Today I see notifications about yesterdays' emails. For some unknown reason I received notifications after several hours. But question remains. Is there a way I can troubleshoot Notification scenario and see why MS Graph did not sent them to me?
After several hours everything started to work properly. It seams there is some internal stuff in MS Graph or Azure that after you create an Application and subscribe via it to emails, it's not starting to work instantly.

Dialogflow + Actions on Google webhook request not being sent

I'm having a little (big) problem using webhook on Dialogflow (API.AI) and Actions on Google.
I have enabled webhooks on Dialogflow, and I'm getting the requests when trying my intents on their console (on the right of the page). I have also completed actions on google integration (setting the welcome intent + auto propagating changes).
However whenever I try my app on a Google Assistant app (phone/google home/their simulator) I'm not getting any request to my server (not even a 404 one), but their debugger shows this error:
status": {
"code": 206,
"errorType": "partial_content",
"errorDetails": "Webhook call failed. Error: 404 Not Found"
},
Has anyone had the same problem, or knows a fix for this ? I know it's not on my end since dialogflow requests are arriving and being correctly responded to.
Jo's answer gave me some hint that solved my problem.
In my case, webhook doesn't work after I turned it on for my agent, so I switched to another agent in the DialogFlow console(top left corner), then switch back to my working agent, click Fulfillment and found it mysteriously got disabled!
So what I did was re-enabled and re-entered the webhook link then click save. After that it worked.
Hope this helps.
Okay, I'm not marking this as resolved because I believe there are many "bugs" on the implementation between Dialogflow and Actions on Google.
Take note that this works IF you are getting webhook requests from Dialogflow console (on the right of the page) but NOT from actions on google simulator.
1) Try changing the name of the app on the "Info" section of Actions on Google and sending messages from Google assistant asking Talk to <new_app_name>
2) Try opening another project from Actions on Google dropdown (up right) and opening the first one after (It causes some reloading on the back I guess)
3) Try both
These have been working for me
I was facing the same issue where the Fulfillment didn't get saved even though a successful message is shown. In my case, I only kept only one Dialogflow tabs (closed the rest) and after clicking on Save a few times, I refreshed the page and made sure the webhook was still enabled. Then tested the app on Simulator and got a post request to my server!
Please make sure the following points :
(1) you have to fill all parameters under Directory Information (you can find this information at Left pane of actionOnGoogle).
(2) your Webhook URL must be a valid HTTPS URL.
(3) please make sure your server is listening for post request as dialogFlow or actionOnGoogle will send POST request on given fulfillment URL.
Directory Information on actionOnGoogle
You might have given link in fulfillment tab for the webhook url starting with http. Dialogflow's internal architecture rejects links which starts with http. Please make it https and it will work. It worked for me.

Why is my Bot responding with a MethodNotAllowed error?

I just started looking into the new Microsoft Bot Framework.
https://dev.botframework.com
I started with this sample:
http://docs.botframework.com/connector/getstarted/#getting-started-in-net
My new bot responds in the emulator (both local version and deployed in Azure), with the default template's sample response "You sent X characters".
Once connected to Slack and FB Messenger, I am getting responses from the Bot, but it's an error message that says "Operation returned an invalid status code 'MethodNotAllowed'"
Before I go any further and add more features, what can I do to troubleshoot and fix this, so that I can get the sample response to work via Slack and FB Messenger?
EDIT: in the dev portal, I don't get any response or error.
Thanks in advance! :-)
Give it 30s to see if you get an internet timeout because it can't find your bot. I'm guessing that maybe http vs https are out of whack on the endpoint or you're missing the /api/messages part of the endpoint URL that comes with the Bot Application template.

Facebook Leadgen does not send Webhook Request

I've an app which collects leads generated using Facebook Leadgen Ad.
I've a Webhook subscribed for that but for some reason it never sends any requests when leadgen form is filled.
Earlier it was working without any issues.
I noticed yesterday that I received request an hour after forms were filled whereas today I've not received any requests but I do see new leads in the CSV file I downloaded.
Will appreciate if somebody can point me to what can be going wrong here.
Thanks in advance!
Not sure if you have come across this but, there is a testing tool which you can use to submit test leads for a page and see if the lead is getting pushed to your app successfully or not -
https://developers.facebook.com/tools/lead-ads-testing?__mref=message_bubble
If you click on the Track Status button after creating test lead it tell you the status of the webhook ping for the submitted lead.