BLYNK
BLYNK.IO       📲 GETTING STARTED       📗 DOCS       👉 SKETCH BUILDER

Raspberrypi blynk invalid auth token

Can someone help me with this problem?

@Sourabh53525 please don’t spam the community forum by asking the same question in multiple topics. I’ve deleted your other post where you posted the same screenshot and the same question.

I’ve already given you the following advice, which you’ve chosen to ignore…

You won’t get help if you don’t provide information.

Pete.

sorry for the inconvenience caused. i am not trying to spam the community

here is the list of hardware and version using

  1. raspberry pi 3B
  2. blynk version 2.0
    3.blynk python library version 0.2.0
    serial monitor says invalid auth token (as in the screenshot)

i am trying connect the blynk iot app with raspberry pi using the auth token

You are using blynk IOT auth token with the old blynk (legacy) library. You should update the library to version 1.0.0 which is the latest.

I’ve already pointed @Sourabh53525 to your recent explanation of how to fix this…

and his response was “and how would i do that please help

:roll_eyes:

Pete.

1 Like

tried updating to latest version of blynk library but still the same

You have to do that manually.

serial monitor shows blynk version 1.1.0 on linux (as in the screenshot)

Yeah, that’s odd. Have you tried uninstalling/reinstalling the library ?

yes many times

You appear to be running the C++ library r as there than the Python library.

The Pi can’t run C++ without an emulator such as WiringPi, which is now deprecated.

You need to start communicating with us, telling us EXACTLY what you are doing, which library you are installing and how, what code you are running etc.

Pete.

1 Like


here is the code that you have provide its working but auth token goes offline in few second and this error pops up

Your register virtual pin handler should look like this example

// Slider widget attached to virtual pin number 3
@blynk.on("V3")
def v3_write_handler(value):
    print('Current slider value: {}'.format(value[0]))

Check the examples

now working well thank you

1 Like

Sir can you please tell me how to assign blynk iot app’s virtual switches to raspberrypi gpio pins?

@Sourabh53525 if you persist in spamming the forum in this way your forum account will be suspended. I’ve deleted two more of your duplicate posts.

Pete.

You can try this example. This example shows you how to control a physical led attached to pin 17.

from gpiozero import LED
import BlynkLib

led = LED(17)

BLYNK_AUTH = 'YourAuthToken'

# Initialize Blynk
blynk = BlynkLib.Blynk(BLYNK_AUTH)

# Register virtual pin handler
@blynk.on("V1")
def v1_write_handler(value):
    If int(value) == 1:
        led.on()
    else:
        led off()

while True:
    blynk.run()

You can also check the gpiozero library documentation, it’s well written and extremely helpful.
https://gpiozero.readthedocs.io/en/stable/index.html