BLYNK
BLYNK.IO       📲 GETTING STARTED       📗 DOCS       ❓HELP CENTER       👉 SKETCH BUILDER

Blynk 2.0 URL to check status of INPUT/OUTPUT and pull data with google sheets

I used to program using Blynk legacy, and now trying to convert to Blynk 2.0, but seems like lots has changed. I loved Blynk for it’s simplicity, so you don’t have to write so much coding for networking.

Blynk legacy used to have an individual web address link that you can use to check the status of your inputs and outputs. All you would need to do then is a simple url fetch in your appscript from google sheets, and you got google sheets communicating with BLYNK and hence your microcontroller. The statement would have looked like this:

UrlFetchApp.fetch(“http://blynk-cloud.com/"+yourAUTHkey+"/get/V”+num).getContentText();

With this, I could even connect multiple arduino’s together into a single spreadsheet, collecting all the data live.

Is there a way Blynk 2.0 can do the same without using 3rd party softwares to do the communication between blynk and google sheets?

At the time of blynk legacy, people were using webhooks, but I thought it was cleaner using appscript from google sheets, and just fetch the data. I would like it if there would be a similar solution. I worry now that they are forcing me to use webhooks.

You can try something I’m not sure if it’s gonna work or not but it’s worth a try, replace " blynk-cloud.com " with " blynk.cloud "

no doesn’t work

Now it’s asking you for a login, and then it just goes straight to your dashboard when I use this link:

http://blynk-cloud.com/omCOqO8JjxopGXhi8F20DCHFz8csI84d/get/V1

This is blynk legacy api not blynk IOT api

right, but how can I have a similar way to work with blynk IOT api?

Check this out
https://docs.blynk.io/en/blynk.cloud/https-api-overview

great, thanks, it’s what I was looking for, and it works!

this is the correct format then:
https://blynk.cloud/external/api/get?token=omCOqO8JjxopGXhi8F20DCHFz8csI84d&v1

1 Like

Exactly.

ok it works now. I’ll post my appscript for google sheets in case someone is interested:

var authKey = "omCOqO8JjxopGXhi8F20DCHFz8csI84d&v1";

function getDataFromBlynk() {

  var countPos = 2;

  for(var i = 1; i <= 1; i++)

  {

    someText = UrlFetchApp.fetch("https://blynk.cloud/external/api/get?token="+authKey+"&v"+i).getContentText();

    SpreadsheetApp.getActiveSpreadsheet().getSheetByName("ALL_DATA").getRange('B'+countPos).setValue(someText);

    countPos++;

  }

}

Thanks for sharing