Invalid auth token BLYNK 2 first setup

Hello, i’m trying to test Blynk 2.0 for first time and I folowed the start up instruction, uploaded into my ESP32 (TTGO T1) the example here:

Changed only my Wifi credential but I receive always “Invalid auth token”.

Tried to ping blynk.cloud and set the IP address but still the same problem…

in Arduino IDE i intalled the latest version Blynk 1.1.0

image

This is IP to the old/legacy system. Did you change your sketch? did you have blynk 1.0 library installed previously?

Yes, but I just uploaded the new sketch from the Exmaple sent me by email once I created the device…
What is the IP address for Blynk 2.0 IoT?

first of all, you should update the blynlk library to the latest version which is 1.1.0

Thanks, Please read my message, the 1.1.0 already installed…

IMG_20220530_213420

I see, but have already 1.1.0 installed

What about the template ID, device name, and auth token ?

Same as in the link of the example, Blynk send me this sketch upon the creation of my device infact it has the same name , Tampelate ID and Token ID that I see i my console Web…

If you have library version 1.1.0 installed, but when you compile and run the sketch it says version 0.6.1 then you have multiple copies of the Blynk library installed and the compiler is finding the wrong one.
If you look near the bottom of the compilation messages then you’ll see where it tells you which library was used, and it’s path.
Find the path of the 0.6.1 library and delete it manually, then try again.

Pete.

I removed the old Blynk folder from the libraries and now I don’t have anymore that error and I can see the device Online, but after adding the 3 defines to my old sketch I receive this message :slight_smile: Packet too big: 20527 and I see the device Offilne

You can post your whole sketch so we can take a look at it.

The sketch is very huge but basically now I’m executing only the init part in the setup routine, in the main loop Blynk.run is commented, then onlt the setup function is running once on the startup

Thats it what is in execution …

Fixed, I just commented the and replaced Blynk.Config and Blynk.Connect by Blynk.begin and the error diasspeared and I see the device online now…

Thanks for your help, but I don’t understand why it was working before with Blynk Legacy to avoid Blynk bloccking now in Blynk 2.0 is not accepted… Are we sure that Blynk.begin is not blocking anymore with Blynk 2.0.
What if I want to specify the Server manually?

Both blynk.begin and blynk.run are blocking functions.

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

Cool, it works with Config and connect instead of Only Begin by specifying “blynk.cloud” .

Thanks a lot.

" Blynk.cloud " is the new blynk server, " blynk-cloud.com " is the old blynk server.

@bek I’ve deleted your code screenshots.

If you want to post code then copy/paste the text and put triple backticks at the beginning and end of it.
Triple backticks look like this:
```

Pete.