Invalid Auth. Token error

I want to see if my code is correct and see why I keep getting the same error when trying to connect to the Blynk app.I keep getting “Invalid Auth Token” on my Serial Monitor. Below is my code.


#define BLYNK_PRINT Serial
 
#include "EmonLib.h"   //https://github.com/openenergymonitor/EmonLib
#include <WiFi.h>
#include <WiFiClient.h>
#include <BlynkSimpleEsp32.h>
 
EnergyMonitor emon;
#define vCalibration 106.8
#define currCalibration 0.52
BlynkTimer timer;
 
char auth[] = "FzaLfxEnjJKlteQ9dd7s5qIiJ0fu62pO";
char ssid[] = "TEAM 6";
char pass[] = "Drawsand23";


float kWh = 0;
unsigned long lastmillis = millis();
 
void myTimerEvent() {
    emon.calcVI(20, 2000);
    Serial.print("Vrms: ");
    Serial.print(emon.Vrms, 2);
    Serial.print("V");
    Blynk.virtualWrite(V0, emon.Vrms);
    
    Serial.print("\tIrms: ");
    Serial.print(emon.Irms, 4);
    Serial.print("A");
    Blynk.virtualWrite(V1, emon.Irms);
    
    Serial.print("\tPower: ");
    Serial.print(emon.apparentPower, 4);
    Serial.print("W");
    Blynk.virtualWrite(V2, emon.apparentPower);
    
    Serial.print("\tkWh: ");
    kWh = kWh + emon.apparentPower*(millis()-lastmillis)/3600000000.0;
    Serial.print(kWh, 4);
    Serial.println("kWh");
    lastmillis = millis();
    Blynk.virtualWrite(V3, kWh);
}
 
void setup() 
{
  Serial.begin(9600);
  emon.voltage(35, vCalibration, 1.7); // Voltage: input pin, calibration, phase_shift
  emon.current(34, currCalibration); // Current: input pin, calibration.
  Blynk.begin(auth, ssid, pass);
  timer.setInterval(5000L, myTimerEvent);
}
 
void loop() {
  Blynk.run();
  timer.run();
}

@Mgoode13 please edit your post, using the pencil icon at the bottom, and add triple backticks at the beginning and end of your code so that it displays correctly.
Triple backticks look like this:
```

Pete.

What does your serial monitor show?

Pete.

[110720] Connecting to Blynk.cloud:80
[111558] Invalid auth token

I keep getting this error. I’ve updated my Library to trouble shoot and im still getting the error.

I want to see more, in particular the Blynk logo and library version number.

Pete.

now im getting this error in the picture below and its not allowing me to open the serial monitor .

If you’ve plugged your board into a different USB port then it might well have a different COM port assigned to it now.
In the IDE Tools menu see if you can see a different port number and select it.

Pete.

It appears that you installed the beta version of the library, which had the new server set by default.
Please downgrade to v0.6.1, or upgrade to v1.0.0-beta.3. Using beta is not recommended, as it is intended to be used only with the upgraded Blynk Cloud. However most things will work.

im still getting an the same error. Ive changed ports, installed different versions of the Blynk Lib and im still getting the same error.

What version of the Blynk library do you have installed now?

Can you expand the bottom section of the IDE, ir better still copy and paste all of the compiler messages, so we can see all of the error messages please.

Pete.