sanderdriesen / WhatsAPINet

A .NET WhatsApp API
32 stars 48 forks source link

login failed : not - authorised #34

Open dennisctp opened 8 years ago

dennisctp commented 8 years ago

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

PeterHunt commented 8 years ago

In WhatsConstants.cs, change the version to 2.13.440

        /// The whatsapp version the client complies to
        /// </summary>
        public const string WhatsAppVer = "2.13.440";

This worked for me.

dennisctp commented 8 years ago

@PeterHunt thanks for the reply, its working now. can you share how to know whats the version to change ? your help is much appreciated

PeterHunt commented 8 years ago

Hi Dennis,

I found this version on a different project. Not sure if this is the latest version, but at least it seems to be accepted by WhatsApp. Maybe some kind of auto-upgrade needs to be implemented?

Now I checked the WhatsApp site, the latest version actually seems to be 2.12.555. Maybe there can be found a way of checking/stripping this line if the current version fails upon Api version?

PeterHunt commented 8 years ago

https://www.whatsapp.com/android

<p class="version" align="center">Version 2.12.555</p>

dennisctp commented 8 years ago

Thanks @PeterHunt the useragent using in this project is Nokia S40 the one u retrieve in previous post is the android version

i did try and changed to 2.13.440 and it worked

from my understanding, its because whatsapp will mark certain version as obsolete and force the user to upgrade to newer version.