Question

Incoming SMS event notifications are not working

  • 8 April 2022
  • 3 replies
  • 562 views

I created the following subscription:

{
  "eventFilters": [
    "/restapi/v1.0/account/~/a2p-sms/messages?direction=Inbound"
  ],
  "deliveryMode": {
    "transportType": "WebHook",
    "address": "https://my-address-goes-here.com"
  },
  "expiresIn": 630720000
}

And I can confirm that it exists when I call:

/restapi/v1.0/subscription

But, for some reason, my destination address never gets notified of the incoming SMS message events.

I did successfully get a different subscription wired up and working correctly for incoming phone calls:

/restapi/v1.0/account/~/telephony/sessions

but I'm not sure what I'm doing wrong with the incoming SMS events.

Any help is greatly appreciated!


3 replies

Userlevel 1

You have to specify the number e.g.

"/restapi/v1.0/account/~/a2p-sms/messages?direction=Inbound&to=+12223334444"

I need to double check if it is supported w/o specifying the to number anymore. There are changes to the service and that filter may not be longer valid.

Specifying a number isn't ideal for us because we'd like to monitor all incoming SMS messages. And, according to the documentation, it is supposed to work.

However, I did want to test your response, so I created a new subscription monitoring a single test number just to see if it would work, and it did work for the first message, but not for any of the subsequent messages (I've sent 5 test messages over a 30 minute span).

So, I deleted the single-number subscription and re-subscribed to the all-number event and tested it. Again, the first event showed up, but none of the subsequent messages did. So it seems to only throw an event the first time.

I deleted-and-recreated the subscription 3 more times to test this theory with the same results each time. The first event works, none of the others do.

Is this happening for anybody else? Is there a different event I need to subscribe to for all incoming SMS messages? I'm not sure where to go from here.

Userlevel 1

First of all, you can only subscribe for incoming messages to your own HV SMS numbers. This means that the numbers owner must be the one who logs in the app.

Secondly, you can subscribe for multiple events, each with a different to number, provided that the number belongs to the same owner.

var eventFilters = [
   "/restapi/v1.0/account/~/a2p-sms/messages?direction=Inbound&to=+1XXXXXXXXXX"
   "/restapi/v1.0/account/~/a2p-sms/messages?direction=Inbound&to=+1YYYYYYYYYY"
]

I receive all messages and never faced such a problem as you reported. Did you send from the same number and to the same number repeatedly?

Can you login this app https://highvolumesms.com to see how many numbers that user owns? And you can open the Conversations page to send and receive text messages. The app uses the same API to subscribe for inbound messages notification as I explained above.

Reply