You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Intercom has webhooks for new events (i.e. messages, new users) - reference.
My issue is that it's better for Intercom messages to be signed with a hub secret string. This is set in the Intercom Webhook dashboard and must be provided to the app to validate the messages. Would it be possible for that string to be set when creating a webhook with skyhook?
As far as I can see from skyhook's code, it doesn't have any kind of storage in the backend to save our settings. When you generate a link, it just replaces it with its own origin and appends the service at the end, e.g.
When skyhook receives a POST request to a url like the above, it just passes it to the appropriate service data parser (here bitbucket) and then posts to the discord webhook hash. All this information is in the url of the post request. So the URL of the post request contains data on
How should I read the body of this post request (e.g. bitbucket)
Where should I forward this message to? (discord webhook hash)
So, the easiest way to integrate intercom supporting hub secret is to literally have the hub secret in the URL, changing a bit the way that (1) works, e.g. providing additional context (the hub secret).
This requires that the POST request between the 2 services are made using HTTPS, because HTTPS does not reveal the URL. There may be other security implications here that I'm unaware of, though.
So, in short I imagine this working in the following way:
Skyhook UI provides another optional field for intercom that is the hub_secret
It generates a URL like https://skyhook.glitch.me/api/webhooks/HASH/intercom:HUB_SECRET
When intercom POSTs there, it knows how to decode the message
It forwards the POST to the discord webhook
Also someone may make the argument that having the hub secret in the url makes it way too accessible, which IMO is a valid argument.
Intercom has webhooks for new events (i.e. messages, new users) - reference.
My issue is that it's better for Intercom messages to be signed with a
hub secret
string. This is set in the Intercom Webhook dashboard and must be provided to the app to validate the messages. Would it be possible for that string to be set when creating a webhook with skyhook?I have already created a node.js app to forward messages from Intercom to Discord - https://github.com/themetalfleece/intercom-discord
Validate signature script - https://github.com/themetalfleece/intercom-discord/blob/master/helpers/validateSignature.js
The text was updated successfully, but these errors were encountered: