question

Andrej Petrushevski avatar image
Andrej Petrushevski asked Andrej Petrushevski answered

Is it possible to add more query parameters in the event filters?

For the purpose of my RingCentral integration I need to create a webhook subscription and I subscribed to the following event:
/restapi/v1.0/account/{accountId}/extension/{extensionId}/message-store/instant?type=SMS
This works great and all incoming SMS messages trigger a webhook call.

I then looked at the page of the event.
https://developers.ringcentral.com/api-reference/Instant-Message-Event

Noticed that this event has some fields and for my next requirement I want to only listen to events that have certain subjects for example:
/restapi/v1.0/account/{accountId}/extension/{extensionId}/message-store/instant?type=SMS&subject=Hello

When trying to create a webhook subscription with this event filter the request failed.

Is there a way to achieve this with RingCentral?

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.

Phong Vu avatar image
Phong Vu answered

Unfortunately, there is no event filter for the instant message event notification. You can easily add some code to check the text message or any other message metadata and decide to further process the message or just ignore it.

1 |3000

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

Andrej Petrushevski avatar image
Andrej Petrushevski answered

@Phong Vu
I am now subbed to this kind of event, so I can confirm that it works and you are able to subscribe to an instant message event like in the description.
My idea was to further filter the event.
For example subscribe to get notifications to messages that are of type SMS and have the subject "Hello" as in the example above:
/restapi/v1.0/account/{accountId}/extension/{extensionId}/message-store/instant?type=SMS&subject=Hello

But that failed.

@ringcentral do you guys maybe know if there's a way to handle this?

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