Invalid Auth codes

Please forgive me I am new to Blynk and am having a problem I copied and pasted a sketch that just required the Auth code and wifi details to be inserted, I uploaded and everything was fine except after connecting it kept repeating" Auth code invalid" I have refreshed and inserted the code several times, I am 70 years old and at first thought it was my eyesight causing me to make mistakes. however I have copied and pasted everything, So please any help would be appreciated.
smartphone Apple Iphone 6+ software version 12.4.8
Location UK

#define BLYNK_PRINT Serial
#include <WiFi.h>
#include <WiFiClient.h>
#include <BlynkSimpleEsp32.h>
int pin = 2;
char auth[] = "_PKeYTAfYKaerdK";       // You should get Auth Token in the Blynk App.
char ssid[] = "VM940";                    // Your Wi-Fi Credentials
char pass[] = "qp5ww";
void setup() {  
  pinMode(pin, OUTPUT); 
  pinMode(pin, HIGH);
  Serial.print("Connecting to ");
  WiFi.begin(ssid, pass);
  int wifi_ctr = 0;
  while (WiFi.status() != WL_CONNECTED) {
  Serial.println("WiFi connected");  
  Blynk.begin("Your auth. Token", ssid, pass);
void loop(){;

Thank you in advance

@Tesla6518 the Auth code should be around 32 characters long. Iā€™m guessing that you arenā€™t selecting it all when you copy it.


1 Like