question

Bob Mulvey avatar image
Bob Mulvey asked ·

A2P 10 DLC SMS - Delivery Error detail report

We are slowly increasing our SMS traffic through the RingCentral A2P 10DLC , moving it incrementally from another provider. Today we had our first ERROR reported in the metrics (graph) given in the RingCentral Developer Portal. It seems that currently we have no way to see the error detail of this delivery error.

While I know we can persist the SMS MessageID on our side and then query the delivery detail, we currently do not do that because other providers give access to this detail via reports.

Can you please tell me how we can get access to this error detail without querying by MessageID?

analytics and reportinga2p sms
1 |1500 characters needed characters left characters exceeded

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

1 Answer

· Write an Answer
Phong Vu avatar image
Phong Vu answered ·

You can read the A2P message store using a batch id to fetch the report for a particular batch. However, you have to save the batch id somewhere in your database after sending a batch (right now we don't have yet an API for querying history batches). You can see the error code of each message which failed. However, if a failure is not identified, the errorCode will be omitted. We are still improving the error list and will add more error codes and detect more failure situations.

/restapi/v1.0/account/~/a2p-sms/messages?batchId=batchId

// Response
{
  "records": [
    {
      "id": "52511",
      "from": "+16505550100",
      "to":["+1650111222],
      "createdAt": "2020-10-14T21:47:51.436491Z",
      "lastUpdatedAt": "2020-10-14T21:47:53.032416Z",
      "messageStatus": "Delivered",
      "cost": 0.007,
      "segmentCount": 1
    },
    {
      "id": "52494",
      "from": "+16505550100",
      "to":["+1650222333],
      "createdAt": "2020-10-14T20:21:23.979729Z",
      "lastUpdatedAt": "2020-10-14T20:21:25.254851Z",
      "messageStatus": "Delivered",
      "cost": 0.007,
      "segmentCount": 1
    },
    {
      "id": "52485",
      "from": "+16505550100",
      "to":["+1650333444],
      "createdAt": "2020-10-14T20:19:56.505461Z",
      "lastUpdatedAt": "2020-10-14T22:20:01.728022Z",
      "messageStatus": "DeliveryFailed",
      "errorCode": "SMS-CAR-104",
      "cost": 0.007,
      "segmentCount": 1
    },
    {
      "id": "52484",
      "from": "+16505550100",
      "to":["+1650444555],
      "createdAt": "2020-10-14T20:19:18.415601Z",
      "lastUpdatedAt": "2020-10-14T20:19:18.668841Z",
      "messageStatus": "SendingFailed"
    }
  ],
  "paging": {
    "pageToken": "pgt1",
    "perPage": 3,
    "firstPageToken": "fpgt1",
    "previousPageToken": "lpgt1",
    "nextPageToken": "npgt1"
  }
}

As you can see, some message failed in sending but does not have the error code in the response. This is because we have not implemented to return error for invalid recipient's number yet. We will improve that in the next releases.

1 |1500 characters needed characters left characters exceeded

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

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 10 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