INTERCON MOBILE GROUP TEXT MESSAGING API FAQ
SMS API FAQ
We've designed our API to be as easy to use however if you run into difficulties integrating text messaging with your own application, here are answers and solutions to commonly asked questions.
Sending text messages (from your computer)
C# Code Example:
string ret=string.Empty;
WebRequest w=WebRequest.Create("https://app.interconmobile.com/api/sending");
w.Method="POST";
w.ContentType="application/x-www-form-urlencoded";
using(Stream writeStream = w.GetRequestStream())
{
UTF8Encoding encoding = new UTF8Encoding();
byte[] bytes = encoding.GetBytes("user=username&pass=userpassword&phonenumber=2127846500&subject=test&message=test message&express=1");
writeStream.Write(bytes, 0, bytes.Length);
}
using (HttpWebResponse r = (HttpWebResponse) w.GetResponse())
{
using (Stream responseStream = r.GetResponseStream())
{
using (StreamReader readStream = new StreamReader (responseStream, Encoding.UTF8))
{
ret = readStream.ReadToEnd();
}
}
}
MessageBox.Show(ret); /* result of API call*/
PHP Code Example:
?php
$ch=curl_init('https://app.interconmobile.com/api/sending');
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch,CURLOPT_POST,1);
curl_setopt($ch,CURLOPT_POSTFIELDS,"user=username&pass=userpassword&phonenumber=
2127846500&subject=test&message=test message&express=1");
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
$data = curl_exec($ch);
print(); /* result of API call*/
How do I send an SMS message with quotes? I keep receiving a -7 response code.
We do not allow you to use quotes in SMS text messages.
I keep receiving a -1 and my username and password are correct.
API Access is probably not yet activated for your account. Please support.
In your API Documentation it says the posted variables for receiving text messages are Phone Number and Message, but your server actually sends the data as the variables "from" and "message".
Please note the differences between Forwarding API and Keyword API.
When someone sends in your keyword [space] message or just replies without a keyword within 3 hours of you sending a message to them, the message forwarding API is used (at the bottom of the page) where the variable is called from; hereas if someone just sends in your keyword then Keyword API is invoked and that variable is called Phone Number. This is under Receiving SMS Messages.
If you have Send Unique Requests Checked then your FORWARDING URL will only be called once and not your Keyword URL.
However many people use different scripts to process forwarded messages (messages that are replies or keyword [space] message) vs just keywords. That is why there is a difference between the names of the variables.
Can I upload a voice file via the Voice Broadcast Function?
No, you must either provide the name of the file you saved in your account (Soundfile) or we can pull your .wav file from a provided URL on your server (Soundsource).
I keep receiving an error message on my phone instead of my Keyword auto-reply when using Keyword Forwarding URL Function.
The URL you supplied for your script is creating an error message. We take that error message and send that back to the user who texted in, as we expect the output of your script to be what you want your auto-reply to be.
Please make sure your script is functioning properly and not generating any types of errors on your own server.
How do I handle global opt outs, error code -104, when using the Send SMS Function?
A global opt out means someone has requested to no longer receive messages from any InterCon Mobile client. We require you to flag this number as an opt out in your own system and refrain from sending it any further messages.

