Monday, 11 July 2011

My Youmint API to send free sms

Recently I saw a site that allows sending free sms without advertisements called youmint.com .
I registered and sent a few sms. But then an idea struck me is there any way to send sms using youmint.com from a desktop application or is it possible to include it in our own applications.
So I searched the web for a youmint api, but was unsuccessful. Then I decided to write my own "unofficial" api for youmint

So then to write a youmint api I thought of emulating the web browser so that my application actually communicates with the website as web browser is communicating with it. For this I used Paros Proxy to study the actual http request response between my web browser and youmint.com .
First I set up the Paros Proxy to listen on my port 8080. Then configured my browser to use the localhost:8080 as proxy server. Then all the communication between my computer and youmint.com was captured in the form of http request and response headers.

Then studying http communication between server and browser I used Java to write my API. Went through the Java documentation for the classes and functions to use to connect with website through the application. 

I used the URL and HttpConnection class from the java.net package to communicate with the server. By setting the request header fields in the same way as in original connection I emulated the web browser making the site think that it is actually communicating with a web browser instead of some application.

To use this api you need to have an account on youmint.com .Currently my API only contains a send() function to send the sms. It takes 4 arguments username,password, sender no. and message. All are strings.
You can add as many recipients as you like separated by semicolon(;). The message can be upto 160 characters only. You also need JDK to use this API in your apps.

You can download the api here:
Click here to download


It works only in India since youmint is a service provided only in India

Thanks and enjoy free smsing.
Signing off for now see yaaa............................!

17 comments:

Sward said...

Send me@ vipulnsward@g.com

Siddhartha said...

Not working for me ??
Can you please recheck its working or not ??
I recompiled both the A.java and SMS.java and put my login and pass in A.java too

I am getting 2 warnings while compiling A.java but it's not the matter.

I have rechecked the url's for login and sending messages.
They are same too.

i am running it using java A
Then it asks for the recipient phone no. and message.
After that it exits and i don't get any message.

Narendra Rajput said...

Siddartha: My friend I just now tried it and it is working just fine for me without any problems.
If you're a java developer you can add few lines of println() in Sms.java file to check uptill the code is running fine. There might also be a problem with your network.
Even if that doesn't solve your problem let me know I'll give a new copy of the api

Siddhartha said...

Hey can u pls give me a new copy
siddhartha@notsharingmy.info

omey said...

hey is youmint has started providing realtime delivery reports so is it possible to receive it using your api.will your api work for android application

NavzzY said...
This comment has been removed by the author.
NavzzY said...

Have You Tried This Site
neway4u

Navzzy said...
This comment has been removed by the author.
Krishan Gahlot said...

Dotnet version windows application to send free sms without adds using youmint api
csharpdemos.blogspot.in/2012/08/send-free-sms-without-adds-from-your.html

Madhurendra Sachan said...

easiest way....i will be adding a page for developers soon....... but check it here http://madsacsoft.com/mad/sms/

Madhurendra Sachan said...

check it
http://madsmssender.blogspot.in/

Tapan Desai said...

Is there a way to check if the credentials entered are valid or not? I tried this thing to catch the server response code but it was always null

BufferedReader br = new BufferedReader(new InputStreamReader(uc.getInputStream()));
while ((temp = br.readLine()) != null)
{
System.out.println(temp);
}

Navzzy said...

@Tapan Desai Use This

BufferedReader br = new BufferedReader(new InputStreamReader(uc.getInputStream()));

StringBuffer response = new StringBuffer();

while ((temp = br.readLine()) != null)
{
response.append(line);
}
String Resp=response.toString();

Neway4U

Vasuki Narasimha said...

@Madhurendra Sachan
We appreciate your work, on the API. It would be more trustworthy if there was API which directly interacts with the YouMint server, instead of our credentials flowing through your server.

Saumil Soni said...

thank you narendra your api worked like a charm......

rashmi pulgam said...

Hello Naredra, I ran the code which you have posted. It asked the recipient no and message and I entered and there were no errors and no exceptions. But the problem is that I didn't receive any message. So how can you solve this?

Vikash Kumar said...

Your api is working perfectly.. But i want to integrate this api in android in which I m getting arrayoutofboundexception in cookies method.. Can u help me to fox it

Post a Comment