question

senthil-dev-raja8044 avatar image
senthil-dev-raja8044 asked igor-bebin answered

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 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"

}

webhookssubscription
1 |3000

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
1 |3000

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
1 |3000

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,
1 |3000

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

Developer sandbox tools

Using the RingCentral Phone for Desktop, you can dial or receive test calls, send and receive test SMS or Fax messages in your sandbox environment.

Download RingCentral Phone for Desktop:

Tip: switch to the "sandbox mode" before logging in the app:

  • On MacOS: press "fn + command + f2" keys
  • On Windows: press "Ctrl + F2" keys