question

senthil-dev-raja8044 avatar image
senthil-dev-raja8044 asked ·

Unable to create webhook subscription

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"
}
aaa
1 |1000 characters needed characters left characters exceeded

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

igor-bebin avatar image
igor-bebin answered ·
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
Share
1 |1000 characters needed characters left characters exceeded

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

senthil-dev-raja8044 avatar image
senthil-dev-raja8044 answered ·
Hi Igor Bebin,
      
Is the document updated? 
Is there any alternate way to create a webhook subscription? Please guide me.

Thanks,
Senthil
Share
1 |1000 characters needed characters left characters exceeded

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

igor-bebin avatar image
igor-bebin answered ·
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,
Share
1 |1000 characters needed characters left characters exceeded

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

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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