Send text message over URL parameters

Send SMS by including all the required parameters in the URL using HTTP GET request.

https://smsapi.yatosha.com/sms/1/text/query?username=myUsername&password=myPassword&to=41793026727&text=Message text

This is all you need to send a message. You can even send this message through your web browser address bar, the same way you would type an address to open a web page. Now, this is something that you could put into your application without writing any code!

The response will be identical to the fully featured SMS response:

JSON

{
  "bulkId": "1478260834465349757",
  "messages": [
    {
      "to": "41793026727",
      "status": {
        "groupId": 1,
        "groupName": "PENDING",
        "id": 7,
        "name": "PENDING_ENROUTE",
        "description": "Message sent to next instance"
      },
      "smsCount": 1,
      "messageId": "844acc75-e5c6-4a21-a7e3-444c412c385b"
    }
  ]
}

There is one more catch. You will probably need to replace hard-coded values like phone number and message text with placeholders unless you want to send the same message to the same recipient every time. Placeholder names will be provided by the application system you are using. What you need to understand is where to put these placeholders. Let’s break down our example request in several lines so we can examine it closely:

https://smsapi.yatosha.com/sms/1/text/query?
username=myUsername
&password=myPassword
&to=41793026727
&text=Message text

Multiple recipients

https://smsapi.yatosha.com/sms/1/text/query?username=myUsername&password=myPassword&to=41793026727,41793026834&text=Message text

Please rate this article to help us improve our Knowledge Base.

1 0