ESP8266 - Invalid Auth Token [SOLVED]

I am using a Sketch to control the NeoPixels over my Phone. The Token from the APP reports me all the time as invalid. What could be the reason?

[17324] Connecting to UPC
[21325] Connected to WiFi
[21325] My IP: 192.168.0.22
[21325] Blynk v0.3.3
[21325] Connecting to cloud.blynk.cc:8442
[21593] Invalid auth token

The sketch

#define BLYNK_PRINT Serial    // Comment this out to disable prints and save space
#include BlynkSimpleEsp8266.h
#include ESP8266WiFi.h
#include Adafruit_NeoPixel.h
#include SPI.h
#define PIN            12 // GPIO pin
#define NUMPIXELS      16 // Number of pixels in strip
Adafruit_NeoPixel pixels = Adafruit_NeoPixel(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800);

char auth[] = "⁠⁠⁠c63053c2a5834432b9f97e9fe2aa8858";  // You should get Auth Token in the Blynk App.

void setup()
{
    Serial.begin(9600);
    Blynk.begin(auth, "UPC", "Test");
    pixels.begin();
}

BLYNK_WRITE(V1) // Widget WRITEs to Virtual Pin V1
{   
int R = param[0].asInt();
int G = param[1].asInt();
int B = param[2].asInt();
Serial.println(R);
Serial.println(G);
Serial.println(B);

  for(int i=0;i<NUMPIXELS;i++){
      // pixels.Color takes RGB values, from 0,0,0 up to 255,255,255
      pixels.setPixelColor(i, pixels.Color(R,G,B)); // Moderately bright green color.
      pixels.show(); // This sends the updated pixel color to the hardware.
  }
}
void loop()
{
  Blynk.run();
}

Exception is pretty clear. Either token is wrong either it is from another (local?) server.

Generated a new Token from the App: ⁠⁠⁠c3af653379324595bee228fca50701e6 and still same problem…
How to know if is local token?

LM��Connecting to cloud.blynk.cc:8442
[21811] Invalid auth token
[26812] Connecting to cloud.blynk.cc:8442
[27056] Invalid auth token
[32057] Connecting to cloud.blynk.cc:8442
[32493] Invalid auth token

Does your app connected to Blynk Cloud? https://github.com/blynkkk/blynk-server/blob/master/docs/custom.png?raw=true

It is Blynk selected

Please do next :

  • Logout;
  • Login;
  • Create new project;
  • Try newly created token.

Sorry Dmitriy but same result with Wifi or 3G connection over a modem.

[21335] Connected to WiFi
[21335] My IP: 192.168.0.22
[21335] Blynk v0.3.3
[21335] Connecting to cloud.blynk.cc:8442
[21578] Invalid auth token
[26578] Connecting to cloud.blynk.cc:8442
[26827] Invalid auth token
[31828] Connecting to cloud.blynk.cc:8442
[32073] Invalid auth token

Token: a5ea07f99f2441bf89b206160add08d1

Did you try those steps?

Yes… Also with a Samsung too… and it does not work.

Please tell me your account

Where can I send you a Personal Message?

Click on my nickname -> “message”

Your token works for me. I see no errors related to your account. So I have feeling that actual connection to Blynk cloud is not happening. Does your ESP chip works without Blynk?

Yes it is working. Running all the time Neopixel Sketch from Adafruit on it. Can you see any logs from me my tests?

I have no ideas what is wrong here. Also your project has no widgets. Is that correct?
Could you please try 0.3.1 library?

Ok… Thanks anyway… Will report if I get it working somehow.

2 Likes

I am getting this error now as well. I am running with the cloud Blynk server at the moment. I was running several projects this morning with usual success, but this afternoon after creating 2 new projects I began receiving the “Invalid auth token” message. I tried logging off/on, refreshing tokens, etc., but no joy. I am using Arduino Mega HW with ethernet shield, a setup that has worked well for weeks. Any thoughts?

Please give me your account.

sent to your personal email.

Dmitiry, a bit more info re my problem…same IOS projects/apps work fine on local Blynk server running on RPI. Still cannot get valid auth token to work when connecting to cloud Blynk.

Thanks again for an exciting tool!

Drew