FrontlineSMS

FrontlineSMS let users send, receive and manage SMS over a mobile network.

Hi everyone,

I have installed and configured FrontlineSMS 2.2.1 and then Creating a Web Connection activity for my WAMP Server.

Sending SMS trigger the HTTP Web Connection successfully.  But I am seeking for outgoing SMS from the Web Connection to the SMS sender? 

For your further information I am using Windows 7 32 bit. In addition, I have read the documentation as well as Googled in advanced but no clue.

In the documentation following is mentioned but how that should be configured on Web Server using PHP scripting language:

URL: [api/webconnection/${activityId}/${secret}]/send 
METHOD: POST
FORMAT: JSON
CONTENT: {
secret: "secret",
message:"Hello,
${contact_name}",
recipients: {
{ "type":"group", "id":"1" },
{ "type":"group", "name":"friends" },
{ "type":"smartgroup", "id":"3" },
{ "type":"smartgroup", "name":"humans" },
{ "type":"contact", "id":"2" },
{ "type":"contact", "name":"bobby" },
{ "type":"address", "value":"+1234567890" }
} }
 

Views: 5362

Reply to This

Replies to This Discussion

Hi Vincent!

I've sent your inquiry on to a developer, and we will get back to you shortly!  Thanks for your patience!

Best,

Val

Dear folks

 

 I have trouble using the WebConnection API, I have used your CURL example without success

My test environment is:

Windows 8.1 with frontlineSMS 2.4.5, I have created the HTTP Web Connection as you can see in the picture1. The PC is using the IP 172.31.103

 

 

Then using Ubuntu 14.04 Desktop installed in a virtual machine, with the IP  172.31.1.104.  I used the curl command

curl http://172.31.1.103:8130/api/1/webconnection/7/ -H "Content-Type: application/json" -X POST -d '{"secret":"123", "message":"hello world", recipients:{{"type":"address", "value":"+123"}}}'

But the error in output.txt appears

 

Please advice.

Attachments:

I'm not sure if Ubuntu should be able to accept mixed quote types to define string contents but you might want to put "Content-Type: application/json" in between single quotes: 'Content-Type: application/json' like you embedded the post parameter as well. I can understand some logic in the idea that it should be either capturing all strings between double quotes or single quotes.

I'm not sure recipients can stay without quotes either.

It couldn't in my case, but that platform was Windows.

Dear Vincent:

Thanks for your advice.  Unfortunately the error seams the same despite several attempts.

Did you test it using curl installed in a Windows 7 environment?

Ones more thanks.

 

On windows 7, this works:

curl http://localhost:8130/api/1/webconnection/1/send -H "Content-Type: application/json" -X POST -d "{'secret':'1234567890', 'message':'Thanks for the sms', 'recipients':[{'type':'address', 'value':'+93700xxxxxx'}]}"

Dear Vincent:

The command works smooth on windows 8.1 with curl installed. I attached a picture for future references.
I will try ones more in Ubuntu.

Attachments:

Reply to Discussion

RSS

© 2017   Created by FrontlineSMS Admin.   Powered by

Badges  |  Report an Issue  |  Terms of Service