summaryrefslogtreecommitdiff
path: root/protocols/WhatsApp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/WhatsApp')
-rw-r--r--protocols/WhatsApp/src/WhatsAPI++/WARegister.cpp8
-rw-r--r--protocols/WhatsApp/src/constants.h3
2 files changed, 7 insertions, 4 deletions
diff --git a/protocols/WhatsApp/src/WhatsAPI++/WARegister.cpp b/protocols/WhatsApp/src/WhatsAPI++/WARegister.cpp
index 2db12da5b5..2f6754d45e 100644
--- a/protocols/WhatsApp/src/WhatsAPI++/WARegister.cpp
+++ b/protocols/WhatsApp/src/WhatsAPI++/WARegister.cpp
@@ -10,11 +10,12 @@
using namespace Utilities;
-/////////////////////////////////////////////////////////////////////////////////////////
-// Token generation
+static char WaToken[] = WHATSAPP_TOKEN;
-static char WaToken[] = "PdA2DJyKoUrwLw1Bg6EIhzh502dF9noR9uFCllGk1442277896714";
+/////////////////////////////////////////////////////////////////////////////////////////
+// Token generation
+//
std::string WAToken::GenerateToken(const string &number)
{
uint8_t digest[16];
@@ -27,6 +28,7 @@ std::string WAToken::GenerateToken(const string &number)
/////////////////////////////////////////////////////////////////////////////////////////
// Account registration
+//
CMStringA WARegister::RequestCodeUrl(const std::string &phoneNumber, const std::string &code)
{
try {
diff --git a/protocols/WhatsApp/src/constants.h b/protocols/WhatsApp/src/constants.h
index 1d7d56ff0d..2fb002ab5b 100644
--- a/protocols/WhatsApp/src/constants.h
+++ b/protocols/WhatsApp/src/constants.h
@@ -23,8 +23,9 @@
// #TODO Move constants below to WhatsAPI++
// WhatsApp
+#define WHATSAPP_TOKEN "PdA2DJyKoUrwLw1Bg6EIhzh502dF9noR9uFCllGk1447796090073"
#define WHATSAPP_LOGIN_SERVER "c.whatsapp.net"
-#define ACCOUNT_USER_AGENT "WhatsApp/2.13.5 S40Version/14.26 Device/Nokia302"
+#define ACCOUNT_USER_AGENT "WhatsApp/2.13.21 S40Version/14.26 Device/Nokia302"
#define ACCOUNT_URL_CODEREQUESTV2 "https://v.whatsapp.net/v2/code"
#define ACCOUNT_URL_REGISTERREQUESTV2 "https://v.whatsapp.net/v2/register"
#define ACCOUNT_URL_EXISTSV2 "https://v.whatsapp.net/v2/exist"