sanderdriesen / whatsapinet Goto Github PK
View Code? Open in Web Editor NEWThis project forked from rquiroz/whatsapinet
A .NET WhatsApp API
This project forked from rquiroz/whatsapinet
A .NET WhatsApp API
Hi
I have downloaded new Code and I am getting below error
SocketException An established connection was aborted by the software in your host machine at wa.SendMessage(tmpUser.GetFullJid(), line);
Please let me know
Hi, i have a issue ussing SendSync
when i execut this command tankes too long to get the result, like 2 minutes for one number
i use the commando like this, variable contact
wa.SendSync(contact, ApiBase.SyncMode.Full, ApiBase.SyncContext.Background, 0, True)
wa.PollMessages()
after i take the result in the OnGetResultSync instance
Public Sub wa_OnGetSyncResult(index As Integer, sid As String, existingUsers As Dictionary(Of String, String), failedNumbers As String())
If existingUsers.TryGetValue(cont, "") = True Then
resultSync = existingUsers(cont).ToString
Else
resultSync = "False"
End If
End Sub
this example is for one number and this take too long to get the result, any help?
Getting this error for the past one week can not send any message. Is it because of whatsapp's end to end encryption? How to rectify this?
receiveLength = socket.Receive(buff, 0, length, 0);
Application stops here inside the WhatsNetwork.cs.. Any Suggestions?
Hi Team,
I am using WhatsApp API for one of the requirement , when 1st time i am sending any whats-app message it is sending correctly but when second time i am sending message it is showing success message but message is not delivered to recipient whats-app inbox.
Please let me know what is wrong happening
Hi
I am trying to use WhatsApINet and I failed, getting bad_token response. I have a few questions:
1- How can I see the timestamp (It is the App release date. Please correct me if I am wrong.) in whatsapp appended to the token?
2- I am using Iphone 6. Is it necessary to set the userAgent as IPhone 6? If so, is this correct
"WhatsApp/2.18.11 ios/11.2.2 Device/Iphone-Asif Bhat Iphone"?
Thanks
Hi! I try to register with my phonenumber but I get {"status":"fail","reason":"bad_token"} response.
What i did wrong?
hi, i using visual basic 2013 and i cant Use the sendMessageImage() i mean, i dont get any error but the image dont arrive to my cel phone, Some one can help me?, i let the code that i try to use for send the pic.
Dim usrMan As New WhatsAppApi.Account.WhatsUserManager()
Dim tmpUser = usrMan.CreateUser(Num, "Contacto")
Dim ImageData = File.ReadAllBytes("C:\WhatsApp\Image\12.JPG")
Dim toNum = tmpUser.GetFullJid()
wa.SendMessageImage(tmpUser.GetFullJid(), ImageData, ApiBase.ImageType.JPEG)
Return True
I'm using the code from the project the WhatsTest
And when i'm running the program i'm getting exception:
On this line:
return Convert.FromBase64String(this.password);
The exception is:
The input is not a valid Base-64 string as it contains a non-base 64 character, more than two padding characters, or an illegal character among the padding characters.
I didn't change the password variable content it's still : static string password = "xLl***************GSA=";
How do i get a new password if i need at all ? And how should i type/add it to the password string variable ?
Thank you.
With each login I get:
Login failed. Reason: not-authorized
yowsup is working fine, but I have to update it, before I get the same error. Some Whattsapp API Changes?
greetz
i'm receiving not-authorized error, when i'm invoking wa.Connect(). Can anyone help me??
mess.identifier_key.serverNickName is not resolving.
One more: i am able to send message but i am not able to receive.
A few days ago (nov 5th around 1AM) this issue started. The API has been updated, I downloaded and updated my project as well, but unfortunately I'm still experiencing the same issue...
Hi Sander,
I would like to contribute to the .net version of WhatsApi.
I have been using it for a while , but I see that people are removing it from their repo's because of threats from WhatsApp ( guys like Team Venomous )
It would be a shame to see this project die.
Will you send me a personal message to discuss this further?
How can I overcome the issue of Not-Authorized?
Sorry, but I'm very confusing with this log:
It seems like its duplicating the txs, and when the onGetMessageReadedClient is fired just message are read, this is the log:
tx <chatstate to="[email protected]">
tx <composing></composing>
tx </chatstate>
tx <chatstate to="[email protected]">
tx <composing></composing>
tx </chatstate>
tx <message to="[email protected]" type="text" id="1448974155-2" t="1448974168">
tx <body>hi</body>
tx </message>
tx <message to="[email protected]" type="text" id="1448974155-2" t="1448974168">
tx <body>hi</body>
tx </message>
rx <ack from="[email protected]" class="message" id="1448974155-2" t="1448974177"></ack>
rx <ack from="[email protected]" class="message" id="1448974155-2" t="1448974177"></ack>
tx <chatstate to="[email protected]">
tx <composing></composing>
tx </chatstate>
tx <chatstate to="[email protected]">
tx <composing></composing>
tx </chatstate>
rx <receipt from="[email protected]" id="1448974155-2" t="1448974181"></receipt>
rx <receipt from="[email protected]" id="1448974155-2" t="1448974181"></receipt>
tx <ack type="delivery" to="[email protected]" class="receipt" id="1448974155-2"></ack>
tx <ack type="delivery" to="[email protected]" class="receipt" id="1448974155-2"></ack>
tx <message to="[email protected]" type="text" id="1448974155-3" t="1448974172">
tx <body>how are you</body>
tx </message>
tx <message to="[email protected]" type="text" id="1448974155-3" t="1448974172">
tx <body>how are you</body>
tx </message>
tx <chatstate to="[email protected]">
tx <composing></composing>
tx </chatstate>
tx <chatstate to="[email protected]">
tx <composing></composing>
tx </chatstate>
rx <ack from="[email protected]" class="message" id="1448974155-3" t="1448974182"></ack>
rx <ack from="[email protected]" class="message" id="1448974155-3" t="1448974182"></ack>
rx <receipt from="[email protected]" id="1448974155-3" t="1448974182"></receipt>
rx <receipt from="[email protected]" id="1448974155-3" t="1448974182"></receipt>
tx <ack type="delivery" to="[email protected]" class="receipt" id="1448974155-3"></ack>
tx <ack type="delivery" to="[email protected]" class="receipt" id="1448974155-3"></ack>
tx <chatstate to="[email protected]">
tx <composing></composing>
tx </chatstate>
tx <chatstate to="[email protected]">
tx <composing></composing>
tx </chatstate>
tx <chatstate to="[email protected]">
tx <composing></composing>
tx </chatstate>
tx <chatstate to="[email protected]">
tx <composing></composing>
tx </chatstate>
tx <chatstate to="[email protected]">
tx <composing></composing>
tx </chatstate>
tx <chatstate to="[email protected]">
tx <composing></composing>
tx </chatstate>
tx <chatstate to="[email protected]">
tx <composing></composing>
tx </chatstate>
tx <chatstate to="[email protected]">
tx <composing></composing>
tx </chatstate>
tx <message to="[email protected]" type="text" id="1448974155-4" t="1448974181">
tx <body>this is just a test of 3 messages!</body>
tx </message>
tx <message to="[email protected]" type="text" id="1448974155-4" t="1448974181">
tx <body>this is just a test of 3 messages!</body>
tx </message>
rx <ack from="[email protected]" class="message" id="1448974155-4" t="1448974190"></ack>
rx <ack from="[email protected]" class="message" id="1448974155-4" t="1448974190"></ack>
rx <receipt from="[email protected]" id="1448974155-4" t="1448974191"></receipt>
rx <receipt from="[email protected]" id="1448974155-4" t="1448974191"></receipt>
tx <ack type="delivery" to="[email protected]" class="receipt" id="1448974155-4"></ack>
tx <ack type="delivery" to="[email protected]" class="receipt" id="1448974155-4"></ack>
tx <chatstate to="[email protected]">
tx <paused></paused>
tx </chatstate>
tx <chatstate to="[email protected]">
tx <paused></paused>
tx </chatstate>
rx <receipt from="[email protected]" type="read" id="1448974155-4" t="1448974198">
rx <list>
rx <item id="1448974155-2"></item>
rx <item id="1448974155-3"></item>
rx </list>
rx </receipt>
rx <receipt from="[email protected]" type="read" id="1448974155-4" t="1448974198">
rx <list>
rx <item id="1448974155-2"></item>
rx <item id="1448974155-3"></item>
rx </list>
rx </receipt>
tx <ack type="read" to="[email protected]" class="receipt" id="1448974155-4"></ack>
tx <ack type="read" to="[email protected]" class="receipt" id="1448974155-4"></ack>
mr.sanderdriesen I need you email
Sorry for the English , I am Brazilian and I speak very little. Signed up a new number for sending and receiving messages , however it seems that all the incoming messages are encrypted. How to solve it? Need help.
Grateful right now !
Hello,
I m getting this error while registering through latest project of GitHub.
"fail", "old version"
In the code I have subscribed to presence subscription request using the code
wa.SendPresenceSubscriptionRequest(tempuser.Jid);
I am getting wa_OnGetPresence called frequently with type "unavailable" for few numbers even though they were not online previously, Ideally a user should come online first and then when he closes his / her whatsapp it should give an "unavailable" status.
Hope I was clear in explaining the issue.
Hi,
I am getting the Login Failed error.
It was working till yesterday.
May be the whatsapp version is updated.
Can you check this?
Regards
Kunal
Hi,
from my understanding, it should be due to whatsapp version being obsolete and the following should be updated:
WhatsConstants.cs
public const string WhatsAppVer =
public const string UserAgent =
WaToken.cs
string token =
can someone let us know how to retrieve the updated constant strings so that we can contribute faster ?
@kunalsmehtajobs i saw your post in previous issue. can you share how to retrieve the token and version?
i am willing to post update to these constant whenever whatsapp version had been updated. But i dont know how to retrieve the string. Please guide me.
thanks
Hi sanderdriesen
i use Whats Test Project "console application"
it is working fine with me send and receive no problem
but after some minutes i lost the connection ,i can not receive any message from others.
my question is how to keep it live? ,i want any time can receive messages from other numbers
Hello, tried to make a enroll, and the WhatApp API returned
"old version"
Then I saw a post about the "version-problem", and changed the constants in the WhatsConstants.cs file towards "2.13.440"
At both constants: "WhatsAppVer" as well as in "UserAgent"
After this, it gave a new error response:
"bad token"
(which I saw is elaborated with a complex number and a hash operation)
Is there something I could change to avoid/correct this?
Otherwise the app/api is cool and it (a least) connects, but not authenticates yet!
Also I seeked priorly, the WART website was filled with trojan and viruses as well, beware of this!
thanks
Hey, I just see that receiving messages isn't working....is this not possible? or should I invoke some method to retrieve it?
hello i'm trying to send an image using c#
but the image not delivered and there is no exception message !!!
here's my code
byte[] img = File.ReadAllBytes("e:\img.gif");
wa.OnConnectSuccess += () =>
{
MessageBox.Show("Connected to whatsapp...");
wa.OnLoginSuccess += (phoneNumber, data) =>
{
wa.SendMessage(to, msg);
wa.SendMessageImage(to,img,ApiBase.ImageType.GIF);
MessageBox.Show("Message Sent...");
};
}
hello, when I use test project on
static void wa_OnGetMessage(ProtocolTreeNode node, string from, string id, string name, string message, bool receipt_sent)
{
Console.WriteLine("Message from {0} {1}: {2}", name, from, message);
}
I get message like this
message = "3\b�����!��H����Q(��H@�M�U;+\r�(����%��"�!��â�x���\v�/އ����Q���3��)�VOZ:��"C3\n!��\r\te����̼��$:���y�Y��K��\n�v��\fJ����\0"��'7ܳ؇?�\tK&���VYv�����(�����0\0"
please decryp this ;)
thank you
I am trying to get LastSeen time for a certain phone (code simplified):
internal ctor()
{
m_whatsApp = new WhatsApp(account.phone, account.password, nickname, true);
m_whatsApp.OnGetLastSeen += OnGetLastSeen;
m_whatsApp.Connect();
m_whatsApp.Login();
string phone = "xxxxxxxxxxx"; // True phone here
WhatsUser whatsUser = new WhatsUserManager().CreateUser(phone, phone);
m_whatsApp.SendQueryLastOnline(whatsUser.GetFullJid());
}
private void OnGetLastSeen(string from, DateTime lastSeen)
{
// TODO: implement
Trace("Got last seen: from " + from + ", lastSeen " + lastSeen);
}
I always get wrong and random (!) values. Two queries, immediately following one another, for the same phone, produce different (+/- 10 days!) results. For testing, I have two phone numbers, one of them does not have WhatsApp account at all, second one have it up and running (with official app), so I pretty sure about values I expect.
I checked sources (WhatsSendBase.handleIq()
) and found nothing suspicious.
I am able to send and recieve messages correctly, the problem is only about LastSeen time.
One more question - what I get, if there is no WhatsApp account for that phone?
Will appreciate any help, thanks.
i am download link this : https://www.nuget.org/packages/WhatsAppAPI
and this code :
WhatsApp wa = new WhatsApp(MyNumber, Mypassword, nickname, false,false);
wa.OnConnectSuccess += () =>
{
MessageBox.Show("Connected");
wa.OnLoginSuccess += (phoneNumber, data) =>
{
MessageBox.Show("Connection success!");
wa.SendMessage(tBto.Text,tBtext.Text);
MessageBox.Show("Message sent!");
};
wa.OnLoginFailed += (data) =>
{
MessageBox.Show("Login failed: {0}", data);
};
wa.Login();
};
wa.OnConnectFailed += (ex) =>
{
MessageBox.Show("Connect failed: {0}", ex.StackTrace);
};
wa.Connect();
MessageBox.Show("END");
what is wrong !!
Hi Guys, just noticed that my incoming messages are now encrypted for some reason.It started doing this a few hours ago, WhastApp probably changed something.I also noticed that not all my numbers are affected but only some of them. I also tested this on the mgp25/Chat-API-NET version..also doing the same thing there.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.