Thanks in advance.
Ok I have to say I do not fully understand the notification and events but I am trying.
I have a php page (notification.php) at
"https://myurl.com/webhook-notification.php?webhookcallback"
I used the code from https://developers.ringcentral.com/guide/notifications/webhooks/quick-start to set up a notification. with the following settings
$DELIVERY_ADDRESS='https://myurl.com/recall/ring/webhook-notification.php?webhookcallback'; $params = array( 'eventFilters' => array( '/restapi/v1.0/account/~/extension/~/message-store/instant?type=SMS', '/restapi/v1.0/account/~/telephony/sessions' ), 'deliveryMode' => array( 'transportType' => "WebHook", 'address' => $DELIVERY_ADDRESS ));
I opened a terminal window and started PHP server and ran the following
$ php -S localhost:5000
when I load the URL page in a browser I get the following Response:
{"uri":"https://platform.devtest.ringcentral.com/restapi/v1.0/subscription/############","id":"################","creationTime":"2023-06-16T16:17:56.455Z","status":"Active","eventFilters":["/restapi/v1.0/account/#########/telephony/sessions","/restapi/v1.0/account/#######/extension/######/message-store/instant?type=SMS"],"expirationTime":"2023-06-23T16:17:56.455Z","expiresIn":604799,"deliveryMode":{"address":"https://myurl.com/recall/ring/webhook-notification.php?webhookcallback","transportType":"WebHook","encryption":false}}
SO if I understand it correctly I should now be notified when a text or sms is sent by a push notification to the following address
https://myurl.com/recall/ring/webhook-notification.php?webhookcallback
I have a code in this php page to make a log evey time the above URL page is loaded. When I call or text the sandbox number I do not get a pageload indicating to me the push notification was not sent. Any advice?
It is on an online web server. I have never tried to post anything to the address from outside the local host so maybe that is the problem?\
If it is an online server, why do you need to run the command
$ php -S localhost:5000
That command is needed only if you run the server code in your local machine and using ngrok tunnel address on the port 5000.
I wasn't sure what the port 5000 was for but thought I would follow the instructions on the documentation as I didn't want that to be the reason it did not work.
If you follow the instructions to run the server locally on your machine, then also run ngrok and get the forward address and use that address as the delivery address as instructed from the dev guide.
$ ngrok http 5000
A new Community is coming to RingCentral!
Posts are currently read-only as we transition into our new platform.We thank you for your patience
during this downtime.
Try Workflow Builder
Did you know you can easily automate tasks like responding to SMS, team messages, and more? Plus it's included with RingCentral Video and RingEX plans!Try RingCentral Workflow Builder