airyhq / airy

💬 Open Source App Framework to build streaming apps with real-time data - 💎 Build real-time data pipelines and make real-time data universally accessible - 🤖 Join historical and real-time data in the stream to create smarter ML and AI applications. - ⚡ Standardize complex data ingestion and stream data to apps with pre-built connectors
https://airy.co/docs/core
Apache License 2.0
366 stars 46 forks source link

Subscribing to a webhook for Google channel doesn't work from the UI #2949

Open ljupcovangelski opened 2 years ago

ljupcovangelski commented 2 years ago

When subscribing to a webhook for the Google channel, from the Google Business Dashboard, it returns an error: URL returned an unknown error.

When subscribing form the Google Business API - everything works as expected with the following call:

curl -X PATCH \
"https://businesscommunications.googleapis.com/v1/partners/ORGANIZATION_ID?updateMask=productCapabilities" \
-H "Content-Type: application/json" \
-H "User-Agent: curl/business-communications" \
-H "$(oauth2l header --json ./SERVICE_ACCOUNT_AUTH_FILE businesscommunications)" \
-d "{ \
  'productCapabilities': [ \
    { \
      'product': 'BUSINESS_MESSAGES', \
      'businessMessagesCapability': {
        'webhookUrl': 'https://PUBLIC_AIRY_FQDN/google',
      },
    },
  ],
}"

Screenshot in attachment (the URL and the token are irrelevant): image

steffh commented 2 years ago

@ljupcovangelski: This is not a publicly available tool and API, so the issue here might be actually related to webhook verification requests in general?

Could it be the case that our general behavior for incoming requests at the relevant POST /google route is to verify the webhook using the partnerKey?

For the verification requests triggered from this internal UI, the relevant behavior might be different as compared to PATCH updates to existing webhooks via the API because the partnerKey verification might fail in that case?