question

Vagelis Hristidis avatar image
Vagelis Hristidis asked Phong Vu answered

SUB-522 Error with Webhook Subscription

We always encounter this error when trying to make a webhook subscription with telephony sessions:

{"errorCode":"SUB-522","message":"WebHook responds with incorrect HTTP status. HTTP status is 400","errors":[{"errorCode":"SUB-522","message":"WebHook responds with incorrect HTTP status. HTTP status is 400","status":"400"}],"status":"400"}

with request:

{"eventFilters":["/restapi/v1.0/account/~/telephony/sessions"],"deliveryMode":{"transportType":"WebHook","address":".../chatapi/webhooks/ringcentralphonecall"}}


The strangest part is that our webhook code doesn't even seem to trigger. We also return the validation token, and we verified the address works using cURL. Could this be an issue with our account?


screen-shot-2022-10-18-at-34347-pm.png


screen-shot-2022-10-18-at-33742-pm.png


Notes:

- We are in sandbox

- App permissions: Call Control, Read Accounts, Ring Out, SMS, Webhook Subscriptions

webhooks
1 |3000

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

1 Answer

Phong Vu avatar image
Phong Vu answered

It should not be your account. But I think it is your environment.

Did you try the example in this quick start?

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