Click here to Skip to main content
14,271,358 members
Rate this:
Please Sign up or sign in to vote.
See more:
I am getting the error "Invalid length for a Base-64 char array or string".

Please find code below:

WhatsApp wz = new WhatsApp(s, "dskgjhgkjgkjgg=", "RTS", false, false);
wz.OnConnectSuccess += () =>
     MessageBox.Show("conected to whatsup");
     wz.OnLoginSuccess += (phonenNumber, data) =>
           wz.SendMessage(to, msg);
     wz.OnLoginFailed += (data) =>
           // wz.SendMessage(to, msg);
           MessageBox.Show("Login Failed :{0}",data);
     // error is here(Invalid length for a Base-64 char array or string)
Updated 23-Sep-15 5:00am
Richard Deeming 23-Sep-15 10:51am
Probably caused by the string you're passing to the constructor - "dskgjhgkjgkjgg=" - which looks like an invalid Base-64 string.

However, since you haven't told us which API you're using, there's no way to know what that parameter is supposed to be.
rahuls1 23-Sep-15 11:11am
can you tell in detail..?
private void button1_Click(object sender, EventArgs e)
rahuls1 23-Sep-15 11:12am
it is password.
Sisir Patro 24-Sep-15 0:39am
Check in which format your class initialization needs the password to be passed as parameter in WhatsApp().

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

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100