Unable to create webhook subscription

  • 1
  • Problem
  • Updated 10 months ago
  • (Edited)
I have tried to create the subscription using postman, am getting the below error.
Could someone help me to resolve this issue?

POST URLhttps://platform.devtest.ringcentral.com/restapi/v1.0/subscription
Request JSON:
{
"eventFilters": [
   "/restapi/v1.0/account/~/extension/~/message-store?direction=Inbound" ],
"deliveryMode":{
"transportType":"WebHook",
"address":"https://<mysitename>/auth/subs/v2.0/v/tkn";
}}

Response JSON:
{
  "errorCode": "SUB-522",
  "message": "WebHook responds with incorrect HTTP status. HTTP status is 500",
  "errors": [
    {
      "errorCode": "SUB-522",
      "message": "WebHook responds with incorrect HTTP status. HTTP status is 500",
      "status": "500"
    }
  ],
  "status": "500"
}
Photo of Senthil Dev Raja

Senthil Dev Raja

  • 80 Points 75 badge 2x thumb

Posted 11 months ago

  • 1
Photo of Igor Bebin

Igor Bebin, Official Rep

  • 700 Points 500 badge 2x thumb
Hi Senthil,

Webhook URL should respond with 200 OK during subscription request, but your URL responded with http 500.

This requirement is actually missing from http://ringcentral-api-docs.readthedocs.io/en/latest/webhooks/, we'll update the doc soon. Thanks you for assistance.

Please advise if you have any other questions.

Thanks,
Igor
Photo of Senthil Dev Raja

Senthil Dev Raja

  • 80 Points 75 badge 2x thumb
Hi Igor Bebin,
      
Is the document updated? 
Is there any alternate way to create a webhook subscription? Please guide me.

Thanks,
Senthil
Photo of Igor Bebin

Igor Bebin, Official Rep

  • 700 Points 500 badge 2x thumb
Hi Senthil,

Not yet, doc will be updated in a couple of weeks. 

WebHook URL must respond with 200 OK during subscription request, could you set up your WebHook to respond with proper HTTP Code?

Also it is important to keep WebHook up and running in order to guaranteed receive notifications. Otherwise subscription will be blacklisted until WebHook become operable again.

Some useful examples with WebHook Demos can be found here:
https://github.com/grokify/ringcentral-demos-webhooks

Thanks,