Call and Parse 3rd party API via Webhook and update virtual pin value (no device involved)

Looking for confirmation ( and possibly an example ) that the following is possible…

Call 3rd Party API using Webhook, Parse response for required response value, and set the appropriate virtual pin value. This is without using a device (no hardware).

  1. Is this the most efficient way to accomplish retrieving 3rd party data?
  2. If possible are there any limitations?

Thank you

Probably not.

Why not just call the API directly and parse the results using the most appropriate method (a JSON parser most likely)?

Here’s an example….

Pete.

1 Like

Thanks Pete, I looked that this example before posting, but wouldn’t this require a device to run the JAVA request from?

I don’t understand the question.

Pete.

Java isn’t required, you only need to install the JSON Library

1 Like

@PeteKnight @Blynk_Coeur Apologies guys - Phase one of this project involves no hardware at all. This is just testing blynk cloud and the blynk app. At this point there is no hardware to load ANY libraries on. The idea is to use blynk cloud webhook functionality to make an API request, parse the response, and assign the value to a virtual pin to be displayed in the app. Sorry for the confusion, I thought the original post covered that part.

I interpreted your initial post to mean something else.

I wasn’t aware that the Blynk server had a method of parsing the webhook response. Have you seen this functionality documented?

Pete.

No, I have not. That’s why I was asking here to see if anyone else had done something similar. I had accomplished this a few years ago in the “Old” blynk using Node-Red, but I was trying to do the same thing without involving another system.

My though was if the webhook can all an API, the parsing (by providing JSON Path) would be something that might be easily
incorporated.

I’m not aware of that functionality being available in Blynk.
My choice would have been to do it all in Node-Red - far easier.

There’s a Blynk IoT contrib now, and Blynk has also just released native MQTT integration without the use for a contrib. I’ve only done a few basic tests with that so far, but it’s looking good.

Pete.

1 Like