Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
Hi everyone,

i want to receive a message using api, i have successfully send sms, but i can't receive message.. help me in this situation.. thanks in advance

Re: help

On 2/20/2015 5:56 PM, Adnan Shiekh wrote:
Quoted text here. Click to load it

Are you sure the sms message is properly addressed to your server?

Have you checked support?  When working with a package,
your first line of support is almost always the support section for that

Remove the "x" from my email address
Jerry Stuckle

Re: help

On Fri, 20 Feb 2015 19:25:02 -0500, Jerry Stuckle wrote:

Quoted text here. Click to load it

I just looked at their API Jerry. It's the sort of thing I wouldn't touch  
with a barge pole.

Their API works like this. You install their app on your phone. Then to  
send an sms from your app on your phone, you send the sms to their  
server, their server pushes it back to the app on the phone, and the app  
on the phone then sends the sms from the phone.

Given that there's an api in the phone already to send an sms (which  
their app uses), if you wanted to send an sms from your app, wouldn't it  
make more sense to call the phone's api directly, rather than sending the  
message through a third party server off the phone which simply bounces  
it back to an app on the phone which calls the phone api.

I can't see the benefit to the person developing apps on a phone of  
sending sms in such a convoluted manner, although I guess the people  
running are happily harvesting any data they can from the  
sms texts passing through their system.

Daft doesn't begin to describe it. And why would you be using php to code  
on an android device? It would make a lot more sense to code in java and  
use the native apis.

Denis McMahon,

Re: help

On 2/20/2015 10:42 PM, Denis McMahon wrote:
Quoted text here. Click to load it

Hi, Denis,

I looked at it briefly, but not nearly as deeply as you did.  From what
you said, I agree it's pretty convoluted.  However, I see they also have
a PHP driver; are there any phones out there which run PHP?  Or is it
something you can put on a PC or server to send SMS messages from there
(I still don't know how you'd receive a message).

Remove the "x" from my email address
Jerry Stuckle

Re: help

On Fri, 20 Feb 2015 22:52:22 -0500, Jerry Stuckle wrote:

Quoted text here. Click to load it

Oh - yeah, maybe it's a case of using your PHP app to send and receive  
messages via your phone ... that might be more useful (I did wonder about  
writing apps in php on a phone).

The only way I can see to receive messages is to poll their server for  
them from the php app, which would either mean running a cron job  
(reliable) or relying on someone accessing the PHP code manually to  
trigger a poll.

Assuming the idea is that the php would be sitting on your web server  
(now makes more sense I guess) that really means a cron job to poll for  
incoming messages.

But even so, assuming the phone has an ip address, it would make more  
sense for a phone app and your web server to communicate directly, rather  
than via a third party server.

Hang your phone off the wifi on your lan, get the phone's lan ip, tell  
the api code on the webserver to make it's rpc calls to the phone ip on  
whatever port the phone app listens to. Then a java app on the phone  
handles the rpc calls from the webserver and interfaces with the phone's  
sms api.

And a third party isn't harvesting data from your sms traffic (except for  
NSA / GCHQ and the mobile network operator, but that's hard to prevent).

Writing a java app for android to listen on a nominated port, receive a  
json string over tcp/ip, talk to the phone sms api and then respond with  
a json string over the same tcp/ip connection wouldn't be difficult.

Denis McMahon,

Re: help

On Fri, 20 Feb 2015 22:52:22 -0500, Jerry Stuckle wrote:
Quoted text here. Click to load it

See also for comments/discussion/examples:;

Quoted text here. Click to load it

However, some cell service prividers permit texting to email addys.

  Marvin L Jones    | Marvin      | W3DHJ  | linux
   38.238N 104.547W |  @ | Jonesy |  OS/2
    * Killfiling google &

Re: help

Hello everyone,

Thanks to all for reply , i have decided to explain my problem in detail, b
asically i have write a web service to send and receive sms using my androi
d phone and if anyone can reply then my application auto reply to user, i a
m firstly use Smssync for this purpose but through this i can't message sen
d successfully then i am decided to use but through this api  
i am successfully send sms but not receive messages ,api claims to support  
receive messages but i have not done, if anyone can help me in this case an
d know better tools for this purpose please told me.... i have used in init
ial days EnvayaSms but i have not successfull to send sms using Envaya... t
hanks in advance

Re: help

On 21/02/15 07:44, Adnan Shiekh wrote:
Quoted text here. Click to load it

Your web service has to ask the API to see if there is new message, you  
have an example at

If you don't do this every X minute, you will never know that you got a  
message. I recommend you to use a cron job for that part, so you need to  
write a cli script and run it.

The phone will not in a magical way send a message to your script.



Re: help

i have know about how to fetch single which one sent from my android phone  
but i have not any issue about sending message only problem in receiving sm
s. any one can tell me how to receive sms using this api.. i have try to ad
d callbacks "Message is received" but not working.... if any body know abou
t the better approach for this api or solution of receiving message please  
tell me.. thanks

Re: help

On 2/21/2015 11:36 AM, Adnan Shiekh wrote:
Quoted text here. Click to load it

Try asking the people who wrote the API.  They know their code better
than anyone else.  I don't think anyone here is going to spend the hours
necessary to understand the API.  After all, we're all volunteers.

Remove the "x" from my email address
Jerry Stuckle

Re: help

On Sat, 21 Feb 2015 08:36:47 -0800, Adnan Shiekh wrote:

Quoted text here. Click to load it

It looks like the callback is meant to be a page on your web server that  
the requests to inform you that there is a message.

You want a php script on your webserver that might contain something like  
the following code:


$mysecret = '<your api callback secret>';

if ($_POST['secret'] == $mysecret) {

  switch($_POST['event']) {

    case 'Received':  
      // an sms was received
      // process received message

    case 'Sent':
      // an sms was sent

    case 'Update':
      // there was an update

      // this should never happen
      error_log('bad api callback event received in smscallback.php', 0);

else {
  // record in your log that the secret was wrong
  error_log('bad api callback secret received in smscallback.php', 0);

Then you log in to your account at, you go to the events  
page, you set up a callback event for received messages, you use the http  
method, you set the secret to <your api callback secret> and you set the  
http url to http://your-web-server-address/path/to/smscallback.php

This will inly work if the server can connect to  


If you are working from home with dynamic ip on adsl you will have all  
sorts of network configuration issues to resolve, none of which are  
relevant to the php newsgroup.

Denis McMahon,

Re: help

thanks Denis alot...nice to meet you..:)

Site Timeline