0

I am trying to send a SMS using REST API in clickatell. I tested it using POSTMAN. I sent the Headers as

POST /rest/message HTTP/1.1
Host: api.clickatell.com
Accept: application/json
Content-Type: application/json
X-Version: 1
Authorization: Bearer xxxxxxxxxxxxxxxxxxxxxxxx

In body

{
    "from": ["xxxxxxxxxx"],
    "mo": "1",
    "text": "Test Message  ",
    "to": ["xxxxxxxxx"]
}

I get a response as

{
    "data": {
        "message": [
            {
                "accepted": true,
                "to": "xxxxxxxxxxxxx",
                "apiMessageId": "xxxxxxxxxxxxxxxxxxxxxxxxx"
            }
        ]
    }
}

But when I check in clickatell account it shows the message is not sent and there is a ROUTING ERROR.

I am getting this error only while using REST API. Using HTTP is works fine. Can someone help?

amrro
  • 1,526
  • 17
  • 21

1 Answers1

0

You're using MO set to 1, so that means that you are attempting to send from a two-way number. Make sure your two-way number is linked to the REST API integration.

  • Yes the two way number is linked to the REST API which is used to send SMS. But still I am getting the same error. If I link it for HTTP it works correctly. – Rajesh Nataraj Feb 07 '18 at 07:27