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

HTTP request not working for Virtual Pins

I’m trying to make a 2 way communication between my ESP8266 and Alexa, and for that, I am using Voiceflow.

The VoiceFlow program requires to set virtual pin V0/Datastream LEDPIN to 0 or 1. And for this, I make GET HTTP requests with the following link:

http://188.166.206.43/auth_token/update/V0?value=1

However, on running the VoiceFlow command, it fails, and whenever I paste the link on Chrome, it displays Invalid Token,even when I’m using the correct authentication token.

I would be highly grateful to you if someone can guide me with the process of making HTTP calls to control Virtual Pins.

Are you using Blynk Legacy or Blynk IoT?

Pete.

Blynk IOT

Okay, well that API call is to the Legacy server, and uses the Legacy syntax.

You should read this:
https://docs.blynk.io/en/blynk.cloud/https-api-overview

including the “Troubleshooting” section.

Pete.

Than you so much for your quick help!

Once again I wanted to confirm-

https://{server_address}/external/api/get?token={token}&{pin}

In this case, server_address is ‘blynk.cloud/’ only, right?

that’s right.

If you read the “Troubleshooting” section as I suggested, you’ll see that it’s better to specify the region subdomain, because the voice flow server may not resolve blynk.cloud to the same server where your Blynk project lives.

Pete.

@PeteKnight Thank you so much for helping me out :slight_smile:

In addition, I am facing another problem with getting the value.

The Voiceflow API block requires for a ‘Header Assignment’ and object path to store the value returned(1 or 0). I am successfully able to turn on & off an LED in my test project, but not able to get the value. The API link works in Chrome and returns the status 1 or 0.
What should I do now?

voiceflow2.1

@PeteKnight @John93 In addition, this is the error I get, only with the GET Datastream Value API call.

Your first question sounds like one that should be directed to a VoiceFlow forum.

As far as the error code when calling the Blynk API from VoiceFlow, it’s impossible to say - without understanding more about exactly what API syntax you’ve used in the test call, which regional server your Blynk project lives on, what datastreams you have configured etc.

Pete.

https://blr1.blynk.cloud/external/api/get?token=[token]&v0[my virtual pin number]

This is the link I have been using

That kind of answers part of one of my questions, but isn’t sufficient to provide any assistance.

This…

is very confusing, because it implies that after the auth token you have &v0 followed by the virtual pin number that you are attempting to get the value of. However, in the above API call, v0 is the virtual pin number, and anything after this will be interpreted as an invalid virtual pin - which may be the cause of your issue.

I’d suggest you post the exact, unedited, API call - you can always generate a new auth token via the web console once you have things working.
I’d suggest that you re-read what other things asked you to provide and go ahead with providing that too if you want assistance with this.

Pete.

Sure! I would love to find a solution.

https://blr1.blynk.cloud/external/api/get?token=R95fO9Tk7um88y5zvhVrszwxsHyc9Ito&v0

Is the API link. I was being reluctant since it is an open community.

the regional server I have used is blr1(Bangalore)

It seems like you’re reluctant to provide any useful information, so I’ll step back from the discussion and let others chime-in, or let you figure it out for yourself.

Pete.

I’m sorry that isn’t the case.

As I stated, my API link is
https://blr1.blynk.cloud/external/api/get?token=R95fO9Tk7um88y5zvhVrszwxsHyc9Ito&v0

With Auth Token being- R95fO9Tk7um88y5zvhVrszwxsHyc9Ito
and virtual pin is v0

My syntax the same as given in documentation, and local server is ‘blr1’, Bangalore

In additition, I have also provided details about the Voiceflow error, and have opened a discussion for the same in Voiceflow

This API is correct and works. So you’re saying that Voiceflow doesn’t work with it? It may be a Voiceflow bug. For example, they may expect eery param to have a value (I don’t know, just a guess), you can change it to:

https://blr1.blynk.cloud/external/api/get?token=R95fO9Tk7um88y5zvhVrszwxsHyc9Ito&pin=v0

@Dmitriy This issue has been resolved on VoiceFlow Forums thanks to @John93

Here’s the link for anyone who faces the same issue-

1 Like