Question

SMS API for sending text to customers and get reply against SMS

  • 29 January 2018
  • 5 replies
  • 5157 views

we have created an application which sends SMS to customer through Rest API (curl) hit.

SMS is Sending Successfully, but the issue is, when any customer reply against any (or specific) Message.

we are not identify the reply of Message.


can we use any event or webhooks? for reply of message, which we have sent to customers and we want to store that reply against

specific message. how we can do this in PHP.


if any body have done such type of work, pleas share your response on it. we don't want to use Message store method or with message Id.



Thanks




5 replies

The RingCentral API supports both webhooks (server-side) and pub/sub (client-side) subscriptions. To retrieve SMS message content, you can create a subscription with the SMS Instant Message Event event filter.

The filter has the following format:

/restapi/v1.0/account/{accountId}/extension/{extensionId}/message-store/instant?type=SMS 

The Developer Guide has general information on webhooks (and pub/sub):

http://ringcentral-api-docs.readthedocs.io/en/latest/webhooks/

Some PHP example code for setting up a webhook is available here:

https://github.com/anilkumarbp/ringcentral-demos-webhooks/tree/master/php

A JavaScript example app is also available:

https://github.com/ringcentral-tutorials/webhook-basics-nodejs-demo

More information on this is available on the SMS Instant Message Event filter here:

https://developer.ringcentral.com/api-docs/latest/index.html#!#RefGetInstantMessageEvent
Hi

Thanks for response, i am using below link.

https://github.com/grokify/ringcentral-sdk-php-lite

and how i can use webhooks (server-side) and pub/sub (client-side) subscriptions or set event in such type of code, which contains the link (file sms.php or in
ringcentral-sdk-php-lite/src/ringcentrallite.php).








You indicated you typed this :  

curl -sS https://getcomposer.org/installer 


Make sure you have the  pipe symbol as shown in the read me :  https://github.com/ringcentral/ringcentral-php#with-composer-recommended

curl -sS https://getcomposer.org/installer | php

I run php 5.6.3
Hello - I am seeking if there is anyone out there that I can hire to write a PHP script for me to allow me to send and receive SMS messages from my RingCentral #.  Ideally the script would monitor a POP3 mailbox, when a new email exists the subject is the phone # to send, the message body is the SMS to send.  I can't find anything out there already made and assume a programmer who is familiar with the RingCentral SMS API platform can write this in a few hours?

Any help would be appreciated!

Scott

Apart from both webhooks (server-side) and pub/sub (client-side) subscriptions, most simple way to receive message content is by RingCentral API :

/restapi/v1.0/account/~/extension/~/message-store/<message id>/content/<attachment id> 

Get Message Content API return the sms content in the API which can be consumed directly from PHP, Java or anything. Message store method or with message Id will be the easiest way to get content through API and can be integrated into any script without much effort.


You can also check both webhook and pub/sub examples using the PHP SDK:

https://github.com/ringcentral/ringcentral-php

Reply