if (!String.IsNullOrEmpty(this.txtPhoneNumber.Text))
{
try
{
this.number = this.txtPhoneNumber.Text;
this.TrimNumber();
WhatsAppApi.Parser.PhoneNumber phonenumber = new WhatsAppApi.Parser.PhoneNumber(this.number);
this.identity = WhatsAppApi.Register.WhatsRegisterV2.GenerateIdentity(phonenumber.Number, this.txtPassword.Text);
this.cc = phonenumber.CC;
this.phone = phonenumber.Number;
CountryHelper chelp = new CountryHelper();
string country = string.Empty;
if (!chelp.CheckFormat(this.cc, this.phone, out country))
{
string msg = string.Format("Provided number does not match any known patterns for {0}", country);
this.Notify(msg);
return;
}
}
catch (Exception ex)
{
string msg = String.Format("Error: {0}", ex.Message);
this.Notify(msg);
return;
}
string response = null;
this.password = WhatsAppApi.Register.WhatsRegisterV2.RequestExist(this.number, out response, this.identity);
if (!string.IsNullOrEmpty(this.password))
{
//password received
this.OnReceivePassword();
}
else
{
string msg = string.Format("Could not verify existing registration\r\n{0}", response);
this.Notify(msg);
}
}
else
{
this.Notify("Please enter a phone number");
}
{
try
{
this.number = this.txtPhoneNumber.Text;
this.TrimNumber();
WhatsAppApi.Parser.PhoneNumber phonenumber = new WhatsAppApi.Parser.PhoneNumber(this.number);
this.identity = WhatsAppApi.Register.WhatsRegisterV2.GenerateIdentity(phonenumber.Number, this.txtPassword.Text);
this.cc = phonenumber.CC;
this.phone = phonenumber.Number;
CountryHelper chelp = new CountryHelper();
string country = string.Empty;
if (!chelp.CheckFormat(this.cc, this.phone, out country))
{
string msg = string.Format("Provided number does not match any known patterns for {0}", country);
this.Notify(msg);
return;
}
}
catch (Exception ex)
{
string msg = String.Format("Error: {0}", ex.Message);
this.Notify(msg);
return;
}
string response = null;
this.password = WhatsAppApi.Register.WhatsRegisterV2.RequestExist(this.number, out response, this.identity);
if (!string.IsNullOrEmpty(this.password))
{
//password received
this.OnReceivePassword();
}
else
{
string msg = string.Format("Could not verify existing registration\r\n{0}", response);
this.Notify(msg);
}
}
else
{
this.Notify("Please enter a phone number");
}
13 Comments
pls make me u r code understand
ReplyDeleteThis comment has been removed by the author.
ReplyDeletePlease Create Whatsapp In VB.NET Please...
ReplyDeletei will try this.
DeleteThis comment has been removed by the author.
DeleteAdd some comments between the code and add sort summery of how code will work
ReplyDeletei make easy code in few days so you have better understand
DeleteThis comment has been removed by the author.
ReplyDeleteAs get user nickname? Thanks!
ReplyDeleteHi, could you send me the entire code for checking the no. existing in whatsapp or not. mail id is aravi.stylish@gmail.com
ReplyDeletehey, i am unable to read the message in .net API these days, the messages are encrypted, are you able to read the messages?
ReplyDeleteDoes .net API support it?
KBC as we all know that is the biggest game show in India , WhatsApp Winner List providing the best games to win from your luck. you can get it's helpline number.
ReplyDeleteWow, What a Excellent post. I really found this to much informatics. It is what i was searching for.I would like to suggest you that please keep sharing such type of info.Thanks www.locateanumber.com
ReplyDelete