Invalid auth token on NodeMCU

• Hardware model + communication type: NodeMCU v3, communication via Wi-Fi
• Blynk server or local server: Blynk server
• Blynk Library version: 0.6.1

Hi, I’m facing an issue with connecting to the blynk servers. When I upload a project to my NodeMCU, it successfully connects to wifi (I changed ssid and password in code below), but I receive an error “Invalid auth token”. I searched your community for help and googled it but by no means nothing has helped me so far.

Please someone take a look at this, I want to use Blynk in my school project and that issue makes it impossible to continue. I used previous versions of Blynk (now labeled as “legacy”) and everything was fine. All problems started after trying to use Blynk IoT.

#define BLYNK_PRINT Serial
#define BLYNK_TEMPLATE_ID "TMPLIVhgyPmW"
#define BLYNK_DEVICE_NAME "Monopoly"
#define BLYNK_AUTH_TOKEN "ZzfRwkFBtwlxpnI2y0ckASxclqCIohON"

#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>

// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = BLYNK_AUTH_TOKEN;

// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[] = "myssid";
char pass[] = "mypassword";

void setup()
{
  // Debug console
  Serial.begin(9600);

  //Blynk.begin(auth, ssid, pass);
  // You can also specify server:
  Blynk.begin(auth, ssid, pass, "blynk-cloud.com", 80);
  //Blynk.begin(auth, ssid, pass, IPAddress(192,168,1,100), 8080);
}

void loop()
{
  Blynk.run();
}
16:31:12.841 -> [1071] IP: 192.168.1.106
16:31:12.887 -> [1071] 
16:31:12.887 ->     ___  __          __
16:31:12.934 ->    / _ )/ /_ _____  / /__
16:31:12.980 ->   / _  / / // / _ \/  '_/
16:31:12.980 ->  /____/_/\_, /_//_/_/\_\
16:31:13.027 ->         /___/ v0.6.1 on NodeMCU
16:31:13.073 -> 
16:31:13.073 -> [1147] Connecting to blynk-cloud.com:80
16:31:15.072 -> [3283] Invalid auth token
16:31:21.916 -> [10146] Connecting to blynk-cloud.com:80
16:31:23.645 -> [11839] Invalid auth token
16:31:30.916 -> [19146] Connecting to blynk-cloud.com:80
16:31:31.197 -> [19385] Invalid auth token
16:31:39.917 -> [28146] Connecting to blynk-cloud.com:80
16:31:39.964 -> [28188] Invalid auth token

hey there,

First, update blynk library to the latest version.

Second, blynk-cloud.com belongs to the old blynk, now it’s blynk.cloud

Hey, it turns out that you were right and it was an outdated library issue. I updated it before posting a topic here but somewhat I had a problem and it did not updated itself at all. I fixed it and now it runs just fine. Thank you very much!

1 Like

how to recover

@sanjay3702 start a new “need help with my project” topic and provide ALL of the requested information.

Pete.