PDA

View Full Version : SMS Api



bislewl
03-16-2015, 02:31 PM
I see in the vPanel that there is an option to do SMS via JSON, however I can't manage to find any more information about this.
Any one have information or the API docs?

Thanks!

VOIPoTim
03-23-2015, 09:24 AM
Hello,

The SMS service is designed to be peer to peer communication only and we're not contractually able to offer it in an API format since that would make it too easy to be used for bulk messaging or sending ads.

We may consider adding a bulk service in the future, but for now with it being for peer to peer communication only, we can't really offer an API for it.

bislewl
03-23-2015, 09:29 AM
It looks like just the notifications can be sent this way, do you have documentation on that?
Thanks!


Hello,

The SMS service is designed to be peer to peer communication only and we're not contractually able to offer it in an API format since that would make it too easy to be used for bulk messaging or sending ads.

We may consider adding a bulk service in the future, but for now with it being for peer to peer communication only, we can't really offer an API for it.

bislewl
03-23-2015, 09:33 AM
I'll try to clarify my question it looks like these are the available options:

Phone Number
Email
online only
POST/URL/JSON - API
POST/URL/XML - API
SIP URL


How do we use the last 3?

VOIPoTim
03-23-2015, 01:22 PM
Please contact support to see if those options are active/available for receiving messages. They may be placeholders by the developers, but support can clarify.

bislewl
03-24-2015, 11:43 AM
I wanted to share the solution to the question.

In the field for the url point it to a file with content below:

For JSON

<?php
$input = json_decode(file_get_contents("php://input"));
$message_id = $input->Message->MessageId;
$time = $input->Message->Time;
$from = $input->Message->From;
$to = $input->Message->To;
$body = $input->Message->Body;

for XML

<?php

$input = file_get_contents("php://input");
$xml = new SimpleXMLElement($input);

$message_id = (string)$xml->Message->MessageId;
$time = (string)$xml->Message->Time;
$from = (string)$xml->Message->From;
$to = (string)$xml->Message->To;
$body = (string)$xml->Message->Body;

Hopefully others will find this useful!

bislewl
03-24-2015, 08:48 PM
I created a github repo here: https://github.com/bislewl/voipo_api


I wanted to share the solution to the question.

In the field for the url point it to a file with content below:

For JSON

<?php
$input = json_decode(file_get_contents("php://input"));
$message_id = $input->Message->MessageId;
$time = $input->Message->Time;
$from = $input->Message->From;
$to = $input->Message->To;
$body = $input->Message->Body;

for XML

<?php

$input = file_get_contents("php://input");
$xml = new SimpleXMLElement($input);

$message_id = (string)$xml->Message->MessageId;
$time = (string)$xml->Message->Time;
$from = (string)$xml->Message->From;
$to = (string)$xml->Message->To;
$body = (string)$xml->Message->Body;

Hopefully others will find this useful!

VOIPoTim
03-24-2015, 11:06 PM
I created a github repo here: https://github.com/bislewl/voipo_api

Thank you for contributing this to the community here.