Detect blynk Status when Token is Invalid

is there any way to detect blynk Status when Token is Invalid?(Same as wifi connection method)
i want to use this flag for do some code.

Please stop tacking on your “Me Too” requests for answers into other users topics… particularly older ones, and definitely convoluted ones.

Create your own, ask clear questions and start supplying information on what you have already tried before continuously begging for help, code, answers, etc.

Blynk status will be disconnected :wink:

But If you wish to hack into the libraries and run if() functions based on incoming debug messages (search for a topic on that), then give it a try, but there is no build-in answer.

1 Like

@s.d.engineering as pointed out by @Gunner you would need to hack the libraries, failing that try to connect to Blynk and if it fails in x ms then assume a bad token etc.

1 Like

Good question. I would consider adding some sort of status at some point…

1 Like

Could this status somehow be shown on the App side? indicating that an attempt was made to connect? Wait, that can’t work, because how would the server know which project the connection was meant for… OK, forget that :blush:

So, where would this status indication work best?

@vshymanskyy I have been thinking of some form of error capture via the Blynk print/debug method I am working on… but I don’t think the script wold actually know if it is invalid… just not responded to… which of course could also indicate bad connection, etc.

Only the server would know that the incoming Auth is invalid (for it at least) but without identification (from the Auth itself, which is invalid, doh!) it can’t really send a clear message to either the proper project or back to the device itself… I am stumped :thinking:

Hmmm… can the server actually communicate with an incoming connection request? Thus, if invalid Auth, instead of simple ignoring it, could it actually send a specific message back to be displayed in the DEBUG printing??

@Costas good evening, just for my own curiosity, what conditions would give you an invalid token?

Poor typing, copy pasting the wrong AUTH (say one for Cloud server while connecting to a Local Server or visa versa), etc… basically user error :wink:

ok thanks @Gunner

Good.:wink:

A scenario will be this:

I have a sonoff basic + oled display that with WiFi Manager ask initially ssid/password and Token.
If wifi is correct but token is invalid, the sketch go on (without, of course, sync nothing).
It will be a good thing to display on OLED DISPLAY that the token is invalid :slight_smile:

For now, i make a void for reset the Wifi credentials, so i can rewrite ssid+password+token :slight_smile:
But know that the token is incorrect, is a good thing :slight_smile:

Old topic.