Question

Unable to create webhook subscription

  • 5 December 2017
  • 3 replies
  • 1345 views

I have tried to create the subscription using postman, am getting the below error.

Could someone help me to resolve this issue?


POST URL: https://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"

}


3 replies

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
Hi Igor Bebin,
      
Is the document updated? 
Is there any alternate way to create a webhook subscription? Please guide me.

Thanks,
Senthil
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,

Reply