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

For general Flowcode discussion that does not belong in the other sections.
Post Reply
Bijumon
Posts: 16
http://meble-kuchenne.info.pl
Joined: Fri Dec 30, 2022 11:44 am
Has thanked: 1 time
Been thanked: 1 time

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

Post 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
Attachments
ESP32IOT Test - Blyink.fcfx
(16.13 KiB) Downloaded 92 times
Screenshot 2024-11-21 071019.jpg
Screenshot 2024-11-21 071019.jpg (102.98 KiB) Viewed 3736 times

Steve-Matrix
Matrix Staff
Posts: 1512
Joined: Sat Dec 05, 2020 10:32 am
Has thanked: 211 times
Been thanked: 351 times

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

Post 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.

Bijumon
Posts: 16
Joined: Fri Dec 30, 2022 11:44 am
Has thanked: 1 time
Been thanked: 1 time

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

Post 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

Post Reply