Hello,
I've been trying to get Webhook to work and have had no luck. I have my URL and my firewall configured. When I browse using Chrome to: https://webhook.mydomain.com:51081/ I get {"status":true}. To me that means the port and URL are configured properly. When I configure my web portal to send Webhooks to https://webhook.mydomain.com:51081/ I get a failure every time. Can anyone offer any suggestions on what could be wrong or what I've missed?
Kind regards,
B. Weaver
Webhook
Re: Webhook
In the setup of your Webhook you have in the property one item called "Path". It is in a way an unclear name since it really is the unique identifier of your Webhook and that identifier must be part of the URL as a "path"
So if you set the path value to "path/mywebhook" your URL is "https://webhook.mydomain.com:51081/path/mywebhook"
Good luck
So if you set the path value to "path/mywebhook" your URL is "https://webhook.mydomain.com:51081/path/mywebhook"
Good luck
Re: Webhook
Thanks for the reply!
I have tested the path and still receive a failure from my order portal.
Settings in Switch:
Settings for the webhook URL in my order portal:
If I am receiving the {"status":true} message when browsing to my base url I can assume my firewall, SSL, and url are correct right?
I have tested the path and still receive a failure from my order portal.
Settings in Switch:
Settings for the webhook URL in my order portal:
If I am receiving the {"status":true} message when browsing to my base url I can assume my firewall, SSL, and url are correct right?
Re: Webhook
Describe the failure in the order system. It is not necessarily a network setup problem.
Just browsing to the URL also does not say everything because that uses a GET. Submitting web hooks is usually done through POST. In order to test the network setup in a reliable way, my advice is to use a tool like Postman and post a couple of parameters. It is vital to do this on the computer of the order system so you are sure you have the exact same situation.
If that works, then it is probably a handshake problem. The default behavior of Switch when receiving a web hook is to acknowledge this by sending { status: true } back to the sender of the web hook. Some systems that send web hooks expect a specific answer and yet other systems send web hooks in two steps: they send something to which they expect a certain response and when the response is correct, they then send the payload. Perhaps your order system behaves like that and although two-way communication has taken place, there is an error because your order system does not like the response.
Just browsing to the URL also does not say everything because that uses a GET. Submitting web hooks is usually done through POST. In order to test the network setup in a reliable way, my advice is to use a tool like Postman and post a couple of parameters. It is vital to do this on the computer of the order system so you are sure you have the exact same situation.
If that works, then it is probably a handshake problem. The default behavior of Switch when receiving a web hook is to acknowledge this by sending { status: true } back to the sender of the web hook. Some systems that send web hooks expect a specific answer and yet other systems send web hooks in two steps: they send something to which they expect a certain response and when the response is correct, they then send the payload. Perhaps your order system behaves like that and although two-way communication has taken place, there is an error because your order system does not like the response.