NodeMcu-Invalid auth token

no, but i did now.

Still the same

Auth Key = 18a5b6b352af4ddc915a4c2d1ec8d91d

What library version are you using?

What does the following show you?

telnet 8443

It should connect you for perhaps a minute or so before dropping the connection.

Paste your formatted sketch.

connection closed by remote host


that’s the correct response because with telnet you don’t provide a token, just means routing to the Blynk server is not blocked on port 8443.

Formatted sketch?

standard at first:

-#define BLYNK_PRINT Serial // Comment this out to disable prints and save space
-#include <ESP8266WiFi.h>
-#include <BlynkSimpleEsp8266.h>

// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = “​18a5b6b352af4ddc915a4c2d1ec8d91d”;
char server[] = “”;

// Your WiFi credentials.
// Set password to “” for open networks.
char ssid[] = “ssidname”;
char pass[] = “password”;

void setup()
Blynk.begin(auth, server, ssid, pass);

void loop()

had to add a - to the includes because of formatting in this editor

Sketch formatting: [README] Welcome to Blynk Community!

change 9600 to 115200

Move Serial.println(“Hello”); to last line of setup() NOT loop().

noting changed

Does the following in a web browser show you your project details?​18a5b6b352af4ddc915a4c2d1ec8d91d/project

Invalid token.

It worked for me.

You have either the wrong ip or wrong token in your project. Check them again until you get the correct info from the url in a browser.

1 Like

the correct url to ping is: ?


ok, reinstalled Blynk app on my android, create a new projekt.




{“id”:1,“name”:“nodemcu1”,“createdAt”:1483895034615,“updatedAt”:1483895117523,“widgets”:[{“type”:“BUTTON”,“id”:1,“x”:0,“y”:0,“color”:600084223,“width”:2,“height”:2,“tabId”:0,“deviceId”:0,“pin”:-1,“pwmMode”:false,“rangeMappingOn”:false,“min”:0,“max”:1,“pushMode”:true}],“devices”:[{“id”:0,“name”:“New Device”,“boardType”:“NodeMCU”,“token”:“e8509f285b374b8cb08f3165b93c96c2”,“connectionType”:“WI_FI”,“status”:“OFFLINE”,“disconnectTime”:0}],“theme”:“Blynk”,“keepScreenOn”:false,“isAppConnectedOn”:false,“isShared”:false,“isActive”:false}

upload new token and checked ip in my sketch, upload this and get the same result:
Connecting to


Correction, the server is the last parameter so it becomes:

Blynk.begin(auth, ssid, pwd, server);

When I do this, I get “Invalid Token.”

@Chirag1712 that’s not related to the syntax. You are either logging into the wrong server or simply have the wrong token. Take a new token and reflash etc but ensure you are correcting to the correct server.

Did you move the slider in the app from default Blynk server across right and enter your server IP / domain name?

Thanks for the prompt reply.
I just did that:- Blynk.begin(auth, ssid, pass, IPAddress(192,168,1,100), 8443);
And now in the serial monitor instead of invalid token it keeps on printing the statement “Connecting to”

Also I am using a local blynk server. In the blynk app also it shows that the device is offline.

Remove “, 8443” and try again. It should be 8442 but it’s not required as it will default to the correct port unless you have changed the configuration of your server. Port 8443 is used but not in this call.

Okay, I just removed “,8443”
Now the statement looks like this:-
Blynk.begin(auth, ssid, pass, IPAddress(192,168,1,100));

but still the serial monitor is printing the statement repeatedly:
[93072] Connecting to