I recently moved to a different country and created a new App as I though it may create some issues, however -> ESP8226 redirects to 45.55.96.146:80 and pinging from the PC = 139.59.206.133… This causes an Invalid Token response when use HTTP API with blynk-cloud.com
/ _ )/ /_ _____ / /__
/ _ / / // / _ \/ '_/
/____/_/\_, /_//_/_/\_\
/___/ v0.5.4 on Arduino
[2822] Connecting to blynk-cloud.com:80
[2944] Redirecting to 45.55.96.146:80
[2995] Connecting to 45.55.96.146:80
[3266] Ready (ping: 150ms).
PING blynk-cloud.com (139.59.206.133) 56(84) bytes of data.
64 bytes from 139.59.206.133 (139.59.206.133): icmp_seq=1 ttl=55 time=24.1 ms
64 bytes from 139.59.206.133 (139.59.206.133): icmp_seq=2 ttl=55 time=24.7 ms
Both devices are in the same country and same network.
http://45.55.96.146:8080/<token>/project will work, sure. My problem is that in the same code i use Blynk library and also query the project via HTTP, and this returns “invalid token” when i query for blynk-cloud.com/<token>/project
My question is more like, why one redirects to different IPs.
I’m on WiFI, and just for information, few years ago we had problems with GeoDNS and after further reading it still an issue for HTTP API: http://docs.blynk.cc/#http-restful-api @Dmitriy is it the latest from the docs?
It explains why the app and your hardware code that uses Blynk.begin works correctly. You’re seeing the re-direction to the original server where your project lives.
It’s a bit ambiguous as to whether this same redirection occurs when calling the API, but issues with IFTTT and your own experience says that the issue still exists.
Fortunately for you, the solution is simple - update the API calls to 45.55.96.146 instead of blynk-cloud.com
You may get faster re-connections if you also specify 45.55.96.146 and port 80 in your Blynk connection code, rather than relying on the DNS redirection process.
This is just based on my observations over time, but the Documentation is fluid… molasses like, but fluid The Devs are busy deving, so Documentation takes time and effort they don’t always have.
But in this case I believe both references are correct, as the general more common GEO-DNS issue with Apps and sketch connection was fixed, but the same-in-name but less common and probably different in structure API method is seemingly not so much… yet.
I think Blynk is working on solutions for both Docs and issues as fast as they can… something about Blynk 2.0 keeps getting hinted at
Well, documentation being up to date or not, the issue mentioned only happened after moving from New Zealand to Denmark, therefore my assumption of GeoDNS.
Not a big deal at this stage as it can be “fixed” but good to know.