question

miaaa avatar image
miaaa asked miaaa commented

Webhook basic question

I am new in building webhook. I just follow the instruction in clover document: https://docs.clover.com/build/webhooks/

I create a public accessible URL using ngrok. I can get the verification code when I verify my URL. In the same time, ngrok returns me the error message says that: POST/ 405 Method Not Allowed

The Clover instruction says that "Enter the verificationCode in the Verification Code field of the Edit App page". But I can not find the verificationCode field in anywhere. Can Someone guide me through this? Thanks in advance.

Webhooks
3 comments
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

sam avatar image sam commented ·

@Miaaa Are you also seeing a popup message on your dashboard "Bad response status: METHOD NOT ALLOWED"?

You're getting a 405 because your endpoint doesn't seem to accept POST requests. An easy way to implement REST api endpoints is to use a microservice like https://www.nanoscale.io/ Or change your URL endpoint to receive POST.

0 Likes 0 ·
miaaa avatar image miaaa commented ·

Hi @Sam, Yes, I receive 405 error. But I am pretty sure my url could accept POST requests. I just asked ngrok(my url provider) technician and he confirmed it. I can receive the verification Code. But the clover dev dashboard returning me 405 error and does not show me the verification code field.

0 Likes 0 ·
sam avatar image sam commented ·

Our webhooks requires SSL. Does your ngrok have the proper SSL certification?

0 Likes 0 ·

1 Answer

Miguel avatar image
Miguel Deactivated answered

From your App's setting page, it should be under the Webhooks section. If you haven't put in the URL that you will receive webhooks yet, you will only see an empty field to put in the URL. After supplying the URL, the text field to submit the Verification Code should appear:

image description

10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community