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

Update value [API with Blynk 2.0]

Hello,

I’m having a problem updating the value using the GET API method
I can [Get Datastream Value] but cannot [Update the Datastream value ]
I have read and followed the instructions below
https://docs.blynk.io/en/blynk.cloud/update-datastream-value

Here is the link that I am using to test
https://blynk.cloud/external/api/update?token=K9363pRmpF18o6haumdmjogwriHO5104&v1=10
=> Response nothing

Please help me …

Hey there. put server address with suffix manually depending on your region:

https://fra1.blynk.cloud/ – Frankfurt
https://lon1.blynk.cloud/ – London
https://ny3.blynk.cloud/ – New York
https://sgp1.blynk.cloud/ – Singapore
https://blr1.blynk.cloud/ – Bangalore

etc.

1 Like

Also try to use IP (ping blynk.cloud and get IP there) instead of domain name. Like
https://46.101.217.214/external/api/update?token=[your token]&v1=10

1 Like

Thank you for your help
I tried but it still not run…

Thank you for your help
I tried but it still not run…
Response : {“error”:{“message”:“Invalid token.”}}

Can you give me more information about your project ?

Is it a token that you get in your device info in Blynk2.0 console?

What information do you need , can I email it ?
Currently I am using Wemos D1 R2 ESP8266 board to communicate with an Arduino to get data and display that data on Blynk (v1.=>.v8)
And i want to edit the value of v as needed

Can you tell me how did you configure you datastream ?
Take a screenshot please.

I’m sure New Blynk 2.0
I’m not using the old Blynk at the moment.

Check it twice. Definitely, this method does work. I’m using it to turn my LEDs by my voice with Google assistant and IFTTT

I send you datastream screeenshot

Everything is okay.

Are you using IFTTT ?

Here is the link where I get datatream
https://blynk.cloud/external/api/get?token=K9363pRmpF18o6haumdmjogwriHO5104&v1

The link is working. It shows 656

OK. I’m tested it. Your string should be

https://sgp1.blynk.cloud/external/api/update?token=K9363pRmpF18o6haumdmjogwriHO5104&v1=10
or
https://128.199.144.129/external/api/update?token=K9363pRmpF18o6haumdmjogwriHO5104&v1=10

Test it

1 Like

Are you using IFTTT ?

No, i am not using anything
The link is working. It shows 656

Yes , working now

It seems, Blynk has its own tokens for each server. So, token from one server does not match the other server and return error message. So, the best way - to ping the blynk.cloud and define which server is in use and then define exact domain.

If the get method works successfully then the update method should work too.