HTTPs REST API Value Send to Virtual Pin

I have a project in Node Red where I can send values to a Blynk Virtual Pin in the legacy version, there is a newer node version but still in Beta since June so I would prefer to send values via the HTTPs REST API or Webhooks.

What URL could I use to send values to a Blynk Cloud Virtual Pin?
What URL could I use to send values back to a Node Red Node?
How do I generate a Token seeing there is no physical device?

I’ve read as far as I can in the Blink 2.0 docs and can’t see how I can set up a virtual device. Would be great If someone could help with setting this up.

This version works really well despite it saying that it’s a beta version. I’ve tested it extensively and have been using it on a daily basis for 18 months and had no problems.

You can send data that way, but there really is no need unless its to access features that aren’t currently available in the contrib such as logging events/sending notifications.

I’d suggest you read this for a more detailed explanation…

I guess you’d have to create your own API endpoint and make it publically accessible, but thats a total waste of time. Just use the Write Event node.

You don’t create a virtual device. You create a template (the board type doesn’t matter) then create a device from that template. You then get your Auth Token and Template ID to create a configuration node in Node-Red.


Hello Pete,

Thanks for the quick and detailed reply, I’ll read through it thoroughly later.

I saw you gave advice about the node on GitHub, I too only wish to send MQTT back and forth and if the node is working like you’ve mentioned here I’d gladly use it.

As the node is not available in the node red pallet install, I tried to install the node via npm (global) but my node red is running on a RPi with the DietPi system and the node_red folder is in a different place /mnt/dietpi_userdata/node_red and after the install nothing showed up in the node red nodes list, I checked node-modules and the node node-red-contrib-blynk-iot wasn’t in there.

Could you give advice on how I could install it manually via the zip or change the npm to install it on a DietPi system?

I see where the problem is now, in the quickstart IDE option I chose other and this doesn’t generate a Token, also now when I create a new template and add a device the Token also isn’t generated, now I’m confused when I generate a new template I don’t see the IDE option and no Token, unless I’m missing something?


Yes it is.

Yes, it’s in the Device Info tab.


Oops, so it is :roll_eyes: now installed.

Found it thanks.

Would this be correct for the URL?


No, I just use although I guess it will work with the region subdomain suffix too.

But, that screenshot look wrong, as it’s missing the Template ID field, so I guess that is a Legacy node.


Oops I did it again, now I’ve picked the correct node and it’s working and online getting data :metal:t3:

Thanks for your help Pete!

1 Like