Connecting to blynk-cloud.com:80 [940436] Invalid auth token

hi
i am new to blink and I’m currently just trying to connect an esp8266 board but im getting this error on the serial monitor “Connecting to blynk-cloud.com:80 Invalid auth token”

Here is the code:

#define BLYNK_PRINT Serial
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>


char auth[] = "N5t- -xxxxxxxxx-xxxxxx";
 
char ssid[] = "xxxx";
char pass[] = "xxxxxxxxxx";

void setup()
{
  // Debug console
  Serial.begin(9600);
  Blynk.begin(auth, ssid, pass);
}

void loop()
{
  Blynk.run();
 
}

Are you using Blynk Legacy or Blynk IoT (New Blynk)?

What Blynk library version do you have installed?

Pete.

i am using Blynk IoT, and i have updated the code for the new version and the version of the library is 1.0.1.
I still can’t connect and this is what the console prints out:

    ___  __          __
   / _ )/ /_ _____  / /__
  / _  / / // / _ \/  '_/
 /____/_/\_, /_//_/_/\_\
        /___/ v1.0.1 on ESP8266

[411] --------------------------
[446] Product:  led
[468] Firmware: 0.1.0 (build Jan 30 2022 17:07:23)
[523] Token:    ...sT56
[549] Device:   ESP8266 @ 80MHz
[583] MAC:      30:83:98:A6:E4:7F
[619] Flash:    4096K
[643] ESP core: 3.0.2
[667] ESP SDK:  2.2.2-dev(38a443e)
[705] Boot Ver: 31
[726] Boot Mode:1
[745] FW info:  468624/0, MD5:6dfdb50a40761967765508abb0179c66
[957] Free mem: 31160
[957] --------------------------
[957] INIT => CONNECTING_NET
[976] Connecting to WiFi: tenda
[4786] CONNECTING_NET => CONNECTING_CLOUD
[4897] Current time: Sun Jan 30 15:08:11 2022
[4898] Connecting to blynk.cloud:443
[5939] <[1D|00|01|00] d-ZIcfkiLOXjBEK4U6PQFi0oh5SasT56
[5990] >[00|00|01|00|09]
[5990] Invalid auth token
[5991] CONNECTING_CLOUD => WAIT_CONFIG
[6600] AP SSID: Blynk led-87AC5
[6600] AP IP:   192.168.4.1
[6601] AP URL:  blynk.setup

code:

#define BLYNK_TEMPLATE_ID "TMPL4hSLr3gV"
#define BLYNK_DEVICE_NAME "template"

#define BLYNK_FIRMWARE_VERSION        "0.1.0"

#define BLYNK_PRINT Serial
#define BLYNK_DEBUG

#define APP_DEBUG

#define USE_NODE_MCU_BOARD

#include "BlynkEdgent.h"

void setup()
{
  Serial.begin(9600);
  delay(100);

  BlynkEdgent.begin();
}

void loop() {
  BlynkEdgent.run();
}

post your whole sketch please

Press the “Flash” button on your NodeMCU to clear the contents of the config store, or upload your sketch using Tools > Erase Flash > All Flash Contents.
Then, re-provision the device via the app.

Pete.

that solved the problem, thanks for helping me out, i really appreciate it

1 Like