Tuesday, 17 November 2015

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

11 comments:

  1. This comment has been removed by the author.

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

    ReplyDelete
  3. 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
  4. This comment has been removed by the author.

    ReplyDelete
  5. As get user nickname? Thanks!

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

Row based styling for Primeng DataTable using Angualr 2,4

------------------------------------Component.Html---------------- < p -dataTable id = "Tbl" [ rowStyleClass ]= " Fu...