NodeMcu-Invalid auth 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 192.168.1.100”

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 192.168.1.100

Also this is the default server configuration of my server:-
#hardware mqtt port
hardware.mqtt.port=8440

#hardware ssl port
hardware.ssl.port=8441

#hardware plain tcp/ip port
hardware.default.port=8442

#http and web sockets port
http.port=80

#https and web sockets port
https.port=9443

#application ssl port
app.ssl.port=8443

Yes you see the hardware is 8442, it’s only the app that uses 8443.

Personally I don’t like the IPAdress datatype. Just use “192.168.1.100”. Try with and without , 8442.

Check your token, check your IP address, check server is running etc.

Yeah. I made the changes.
I refreshed the auth token.
It works with the both “,8442” and without it!
Thanks a lot @Costas! Great help and support!

Also now I am able to control the NodeMcu with the app. Even the serial monitor shows “Ready”. However the blynk-cloud.com/my_token/project shows invalid token

Also i had some doubts about controlling AC devices with my NodeMcu. Can I ask? Or shall i search for a different thread?

It should, 8442 is the default so it’s not needed. There are other defaults too, like not specifying a server when you want to use the awesome Blynk server :slight_smile:

Well it will do because you are not using blynk-cloud.com, change to your server IP and if you have the server configured correctly the API will work.

Start a new thread giving as much details as possible. We control our AC units with Blynk.

1 Like

Yes as I set my server it works! :slight_smile:
Thanks once again for the help.
I will just start a new thread now!

@Costas This is the link:-
NodeMcu-Controlling my AC fan speed