Page 1 of 1

Error HTTP/1.1 301 Moved permanently From Blynk IOT API ESP32

Posted: Thu Nov 21, 2024 4:27 am
by Bijumon
Hi everyone

i am trying to read a value from Blynk IOT API.

Below the URL for read value from My Blynk.

https://sgp1.blynk.cloud/external/api/g ... WcR6Bd5&v6

Link well working in browser and i can get value, if send same from ESP32, i am getting replay "HTTP/1.1 301 Moved permanently".

serial monitor screen shot attached.

Please Help


Bijumon

Re: Error HTTP/1.1 301 Moved permanently From Blynk IOT API ESP32

Posted: Thu Nov 21, 2024 9:16 am
by Steve-Matrix
A 301 return is a redirection response and the 'location' part shows where the original url is now located. When you receive a 301 you should then navigate to the received location instead (a browser will do this automatically, but you will need to do this within your own code).

However, it looks like the 301 redirection in your case is sending you to a "bad request" page. This means there is an issue with your original request.

Unless there is an obvious difference that you can see (e.g. the ESP32 is using http instead of https), then one way to solve this is to compare the low-level packets sent by the browser-based request and the ESP32-based request and see where they are different. A tool like WireShark can do this.

Re: Error HTTP/1.1 301 Moved permanently From Blynk IOT API ESP32

Posted: Sat Nov 23, 2024 3:17 pm
by Bijumon
Hi Mr. Steve
thanks for your advice
the solution which you given is difficult for me
any how i tried but no luck