Particle Argon - Invalid Auth Token

• Hardware model + communication type. Particle Argon + Wifi
• Smartphone OS: iOS 14.5.1
• Blynk server
• Blynk Library: 1.0.0

I’m trying to test the new Blynk server with my Particle Argon. I followed the documentation instructions and modified a sketch that worked previously the old Blynk. I created a device and a template, which I added to the sketch.

Running the sketch, the serial monitor shows the following:

[494480] Connecting to 45.55.96.146
[494864] Invalid auth token

The sketch is below. Note that I have tried it without the BLYNK_IP and it still gives an auth token error. I’d really appreciate any guidance as to what I’m doing wrong.

#define BLYNK_PRINT Serial  // Set serial output for debug prints

#include <blynk.h>

#define BLYNK_TEMPLATE_ID "<<omitted>>"
#define BLYNK_DEVICE_NAME "Argon"
#define BLYNK_IP IPAddress(45, 55, 96, 146)

char auth[] = "<<omitted>>";

BLYNK_WRITE(V1) {
    int pinValue =
        param.asInt();
    Serial.print("Blynk button: ");
    Serial.println(pinValue);
    digitalWrite(D7, pinValue);
}

void setup() {
    Serial.begin(9600);
    pinMode(D7, OUTPUT);
    delay(5000);
    Blynk.begin(auth, BLYNK_IP);
}

void loop() { Blynk.run(); }


BLYNK_TEMPLATE_ID

should appear on top of your sketch.
i.e. above any includes you have

2 Likes

That’s the IP address for one of the Blynk legacy servers, so that server is (correctly) telling you that there is no project with that Auth token on that server.

You should either use "blynk.cloud" or the URL for the server where your project lives…

https://fra1.blynk.cloud/ – Frankfurt
https://lon1.blynk.cloud/ – London
https://ny3.blynk.cloud/ – New York
https://sgp1.blynk.cloud/– Singapore
https://blr1.blynk.cloud/ – Bangalore

The server region could be found in the right bottom corner of the web interface.

If you need to use an IP address then ping the relevant URL above to obtain it.

Pete.

2 Likes

Could you please share how you were able to add device for Particle Argon? I have not been able to do this yet

I am also following this… I have Particle Argon devices as well and want to get working with the new Blynk Cloud. Are you using the new library and is it in the Particle Cloud console, or are you using Particle Workbench?

Thank you @PeteKnight and @vshymanskyy ! My code project works now.

The top of my code now reads

#define BLYNK_TEMPLATE_ID <<omitted>>

#define BLYNK_PRINT Serial  // Set serial output for debug prints

#include <blynk.h>

#define BLYNK_DEVICE_NAME "Argon"
#define BLYNK_IP IPAddress(64, 225, 16, 22)  // https://ny3.blynk.cloud/ – New York

@PeteKnight You said I could also just use “blynk.cloud”. Would that be in place of the IP address? Do you know the syntax for this?

In the web console, I added “Particle” as the device.

I then had to set up manual datastreams for the relevant pins.

I’m using the blynk library that can be installed via Particle Workbench, and I’m using Particle Workbench.

1 Like

OK Thank you. I was able to finally get it to work.

1 Like