Click here to Skip to main content
15,916,371 members
Please Sign up or sign in to vote.
1.48/5 (4 votes)
See more:
Problem is how get my whatapp Password in Whatapp Api......Please Give Idea or like

What I have tried:

string nickname = "Test";
string sender = "xxxxxxxxxxxxxx";
//My Phone Number tryed with 049xxxxxxxxxxxx, 0049xxxxxxxxxxxxxx, 49xxxxxxxxxxxxxxx, xxxxxxxxxxxxxx
string imei = "xxxxxxxxxxxxxxxxxxxxxxxxx";//My IMEI
WhatsApp me = new WhatsApp(sender,imei ,nickname,true);
Console.WriteLine(me.ConnectionStatus);// I get a Connection!
me.SendMessage("xxxxxxxxxx", "This is a Test!");// Send Message
//No Message received :(
Updated 11-Aug-22 19:26pm

I believe you copied that code from this thread, too: whatsapp - C# How to send messages with - Stack Overflow[^].

Basically, WhatsApp has no password, this is a requirement of the API written for WhatsApp communication. Also, from the first answer it is clear that you need to send your own phone number to get the code. Then use that as the authentication medium. I am not sure, but this thing (kind of) sounds like OAuth methods for authentication and authorization.

Pankaj, on that thread, shared a code that works,
WhatsApp wa = new WhatsApp("your number", "your password", "pankaj", false, false);
wa.OnConnectSuccess += () =>
    wa.OnLoginSuccess += (phno,data) =>
        wa.SendMessage("to", "msg");

    wa.OnLoginFailed += (data) =>
        Response.Write("login failed"+data);
wa.OnConnectFailed+= (ex)=>
    Response.Write("connection failed");

The problem with these methods and mechanisms is that these APIs are all third-party and they lack proper documentation for the objects and methods. WhatsApp themselves don't have an API because they don't store the data on their central server. To have an API, it would require you to store a miniature server on every device. I did write this in another thread, and I can't find that... Sorry.

OAuth - Wikipedia, the free encyclopedia[^]
Share this answer
To get your password please use WART
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900