Uber webhook not triggering for driver_canceled, completed - uber-api

I am currently using sandbox-api to test my webhooks
If I send {"status": "accepted"} or {"status": "arriving"} webhooks are being invoked as expected
If I send {"status": "driver_canceled"} after {"status": "accepted"} requests.receipt_ready is invoked, but requests.status_changed is not
If I send {"status": "completed"} after {"status": "accepted"}, nothing is invoked.
Am I missing something ?

Related

Get GitHub security alerts through notification API

I want to get GitHub notifications about a given repo’s Security alerts through the notification API, and I would like to know the JSON returned by this API.
Let say for a given repo I subscribed to the Release and Security alerts in GitHub UI:
When I publish a “Security advisory” on a given repo, I don’t receive any notification with the others account subscribed to this repo. I think this is because GitHub needs to validate this security advisory before it sends the notifications events.
So can someone please give me an example of JSON returned by the notification API for a Security event ?
Here is an example of JSON returned by the notification API for the Release events (as I can generate some by myself):
curl -su <me>:<token> https://api.github.com/notifications
[
{
"id": "3267365319",
"unread": false,
"reason": "subscribed",
"updated_at": "2022-03-14T16:07:41Z",
"last_read_at": null,
"subject": {
"title": "0.5.0",
"url": "https://api.github.com/repos/pfrayer/release-tester/releases/61780007",
"latest_comment_url": "https://api.github.com/repos/pfrayer/release-tester/releases/61780007",
"type": "Release"
},
"repository": {
...
I’m looking for the same kind of JSON, but for the Security events.

Sendgrid open tracking event webhook not firing after the email is opened

I am trying to track email "open" event on Sendgrid. I have enabled Open tracking in Tracking setting in my Sendgrid account. I have also enabled Event webhook under Mail settings->Event Settings and I have enabled event webhook for all the events.
When I send the email, I get the event webhook response for "processed" and "delivered" events but if I open the emails I don't get any webhook response. I tried opening the email in Outlook and in Gmail in chrome browser.
Is there anything else to be done that I am missing? Please help.
Below is the response I get for processed and delivered mails.
[
{
"OrderId": "5555",
"email": "myemail#gmail.com",
"event": "processed",
"send_at": 0,
"sg_event_id": "cHJvY2Vzc2VkLTE3NTE3NjIzLV9PbGs1ZWx4U1VHUUZSTUk3aVBlY0EtMA",
"sg_message_id": "_Olk5elxSUGQFRMI7iPecA.filterdrecv-p3iad2-865cf6bb5-sddvl-18-5F560026-42.0",
"smtp-id": "<_Olk5elxSUGQFRMI7iPecA#ismtpd0002p1lon1.sendgrid.net>",
"timestamp": 1599471654
},
{
"OrderId": "5555",
"email": "myemail#gmail.com",
"event": "delivered",
"ip": "167.89.12.138",
"response": "250 2.0.0 OK 1599471656 r7si5783789ejy.514 - gsmtp",
"sg_event_id": "ZGVsaXZlcmVkLTAtMTc1MTc2MjMtX09sazVlbHhTVUdRRlJNSTdpUGVjQS0w",
"sg_message_id": "_Olk5elxSUGQFRMI7iPecA.filterdrecv-p3iad2-865cf6bb5-sddvl-18-5F560026-42.0",
"smtp-id": "<_Olk5elxSUGQFRMI7iPecA#ismtpd0002p1lon1.sendgrid.net>",
"timestamp": 1599471656,
"tls": 1
}
]
First of all, check the settings
Next, check your setting for engagement data
Finally, check your mail clients are allowed to download images and have any extensions block ads or not
Sendgrid will add a transparent 1-pixel image at the bottom of email, if with any reason cannot load this picture, you won't receive opened event
I had the same problem, you need to go to settings-> tracking and make sure open and click events are enabled.

Google Action returning Empty Speech Response

I am receiving this response from my Google Action and I am unable to figure out why an empty response would be sent out. My Intents all seem to have the right webhooks and default responses where needed.
{
insertId: "hrf6g3f6f1zhg"
labels: {
channel: "production"
querystream: "GOOGLE_USER"
source: "AOG_REQUEST_RESPONSE"
}
logName: "projects/math-164823/logs/actions.googleapis.com%2Factions"
receiveTimestamp: "2018-08-01T13:05:42.164452044Z"
resource: {
labels: {
action_id: "assistant.intent.action.TEXT"
project_id: "math-164823"
version_id: ""
}
type: "assistant_action"
}
severity: "DEBUG"
textPayload: "Received response from agent with body: HTTP/1.1 200 OK
Server: nginx/1.13.6
Date: Wed, 01 Aug 2018 13:05:42 GMT
Content-Type: application/json;charset=UTF-8
Content-Length: 494
X-Cloud-Trace-Context: f0727cf8856a9fa6cbf1f0e861c14836/7685757289520895586;o=0
Google-Assistant-API-Version: v1
Assistant-Interaction-Error-Code: -1
Assistant-Interaction-Error-Message: Failed to parse Dialogflow response into AppResponse because of Empty speech response
Via: 1.1 google
Alt-Svc: clear
{
"responseMetadata": {
"status": {
"code": 10,
"message": "Failed to parse Dialogflow response into AppResponse because of Empty speech response",
"details": [{
"#type": "type.googleapis.com/google.protobuf.Value",
"value": "{\"id\":\"c132e91a-4918-4720-ae54-8deacd5bd59e\",\"timestamp\":\"2018-08-01T13:05:41.908Z\",\"lang\":\"en\",\"result\":{},\"status\":{\"code\":200,\"errorType\":\"success\"},\"sessionId\":\"1533128627128\"}"
}]
}
}
}."
timestamp: "2018-08-01T13:05:42.106660479Z"
trace: "projects/368086278893/traces/1533128627128"
}
It is very difficult to diagnose the problem without seeing all of your Intents and the code you are using in your fulfillment, but a few things to look for in this case:
Make sure your Intents either have a Response set in the response section, or the switch saying to use a fulfillment webhook is turned on.
Make sure your Intents all have a function in the webhook that is supposed to return something.
If you are making asynchronous calls (such as calls to APIs that run on other servers), make sure you are using Promises and that you are returning a Promise as part of your intent handler.
Check the logs for your webhook. Make sure there are no errors logged when it runs. If necessary, add logging to make sure you're returning what you think you're returning.
You may wish to run your webhook with a proxy, such as ngrok, in between so you can get detailed request and response logs and see the exact JSON that your code is sending back.
Turn on Dialogflow's feature to log to Google Cloud's StackDriver.
Try and enable V2 for Google Assistant in Dialogflow integration. If your Dialogflow agent is Old while integrating enable as per the below-highlighted section.
If this is not working, update your question with Dialogflow intents, Settings, Webhook code and version of the client.

Facebook messenger webhook won't receive any messages

I created a webhook for facebook, the subscription worked fine, (See the JSon result below). But whenever i send a message to the page, the webhook doesn't receive anything, the only entries from the webhook that i receive is when i subscribed to the page.
{
"data": [
{
"object": "page",
"callback_url": "https://{MY_DOMAIN}.nl/facebookmessenger/webhook/index.php",
"fields": [
"conversations",
"message_deliveries",
"messages",
"messaging_account_linking",
"messaging_optins",
"messaging_postbacks"
],
"active": true
}
]
}
I know for a reason that the webhook page itself works. So i don't feel the need to add it here.
If there's anything else you need to ask, you're free to ask
Well, i feel dumb. I linked everything up, but forgot to put the page i'm using on the developers.facebook.com at the messenger webhook. Sorry about that haha

all_trips Webhooks: Find out which user the status_changed is for

I've got the Webhooks working for our developer accounts, and it emits a status_changed message every time there is an Uber request, even if the request was not initiated from our app (using the "all_trips" permission)
When we get the response back, how do we determine which user this is for? E.g. in the response below, there is no way to determine that and using the server token to authenticate to the resource_href gives an "Invalid OAuth 2.0 credentials provided" error.
{
"event_id": "3a3f3da4-14ac-4056-bbf2-d0b9cdcb0777",
"event_time": 1427343990,
"event_type": "all_trips.status_changed",
"meta": {
"resource_id": "2a2f3da4",
"resource_type": "request",
"status": "accepted"
},
"resource_href": "https://api.uber.com/v1/requests/2a2f3da4"
}
Thanks for catching this! We rolled out a fix that adds the users UUID as an additional field in the "meta" section, as well as updated our documentation here: https://developer.uber.com/docs/webhooks
Let us know if you have any more trouble!