how to check a phone number if register at whatsapp ??

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");
            }

Post a Comment

13 Comments

  1. pls make me u r code understand

    ReplyDelete
  2. This comment has been removed by the author.

    ReplyDelete
  3. Please Create Whatsapp In VB.NET Please...

    ReplyDelete
  4. Add some comments between the code and add sort summery of how code will work

    ReplyDelete
    Replies
    1. i make easy code in few days so you have better understand

      Delete
  5. This comment has been removed by the author.

    ReplyDelete
  6. As get user nickname? Thanks!

    ReplyDelete
  7. Hi, could you send me the entire code for checking the no. existing in whatsapp or not. mail id is aravi.stylish@gmail.com

    ReplyDelete
  8. hey, i am unable to read the message in .net API these days, the messages are encrypted, are you able to read the messages?

    Does .net API support it?

    ReplyDelete
  9. 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.

    ReplyDelete
  10. Wow, 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