Using a sandbox app, PHP SDK. Trying to create a subscription, with the payload
Array
(
[eventFilters] => Array
(
[0] => /restapi/v1.0/account/~/telephony/sessions
)
[deliveryMode] => Array
(
[transportType] => WebHook
[address] => https://64979567.ngrok.io/index.php?m=integrations/webhooks&a=ringCentral
)
[expiresIn] => 630720000
)
This is what gets posted to my webhook address,
POST /index.php?m=integrations/webhooks&a=ringCentral HTTP/1.1
Validation-Token:
d206fc96-ef23-4fe9-98c2-a087358446c7
Content-Type: application/json; charset=UTF-8
Accept: application/json
Accept-Encoding: UTF-8
User-Agent: RingCentral-WebHook/8.3
Content-Length: 0
Host: 64979567.ngrok.io
X-Forwarded-Proto: https
X-Forwarded-For: 192.209.29.132
This is what my webhook returns,
HTTP/1.1 200 OK
Cache-Control: no-store, no-cache, must-revalidate
Content-Type: application/json; charset=utf-8
Date: Mon, 16 Dec 2019 19:43:17 GMT
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Last-Modified: Mon, 16 Dec 2019 19:43:17 GMT
Pragma: no-cache
Server: nginx
Validation-Token:
d206fc96-ef23-4fe9-98c2-a087358446c7
Vary: Accept-Encoding
Vary: Accept-Encoding
Content-Length: 0
And what I get back from the API is "WebHook server response is invalid". I'm not sure what's missing, here.