How to call an API from Blynk into Labview

I’m storing sensors data into Blynk via Arduino and want to call that sensor data into Labview software. Could someone put the steps pls.

According to this document:
https://zone.ni.com/reference/en-XX/help/371361R-01/lvconcepts/interacting_vis_ws/
it is possible to make HTTP POST, GET, PUT or DELETE calls to external services and handle responses in the form of XML string, HTML, plain text, or JSON formats.

You should use the GET method and configure Labview to expect a JSON formatted response.

The Blynk API documentation for this is here:
https://blynkapi.docs.apiary.io/#reference/0/get-pin-value/get-pin-value

There is an issue to be aware of though. There are three Blynk cloud servers dotted around the world, but your Blynk project, and it’s associated Auth code, only exists on one of them. When you’re making an API call from your PC’s browser, you’ll almost certainly hit the correct server if you use blynk-cloud.com in your API call. But, the Labview servers may be located in a different part of the world to you, so an API call to blynk-cloud.com may resolve to a different Blynk cloud server, and result in an ‘invalid token’ response.
The way around this is to find-out which Blynk cloud server your project is on, by pinging blynk-cloud.com from your PC.
As you’re located in India, I assume that your project sits on the Singapore server, whose IP address is 188.166.206.43

I’d suggest testing the API call from your PC’s browser to ensure you have the correct format and the expected data is being returned, before testing the same API call from within Labview.

Pete.

1 Like

thanks a lot for ur help