Is it (still) possible to upload image from ESP32 CAM to Google Drive?

I’ve found numerous tutorials and examples of uploading an image to Google Drive using ESP32 CAM which are all more or less the same but they all result with:

[E][WiFiClientSecure.cpp:133] connect(): start_ssl_client: -1

when executing:

client.connect(myDomain, 443) // const char* myDomain = "script.google.com"

What I have noticed is all of these examples are 2 or 3 years old so the question is - has something changed regarding Google Drive API in the meanwhile and is uploading an image using Google Scripts + doPost() function still even possible?

I saw a few mentions of “Google Scripts are using redirects” and I’ve found this HTTPSRedirect library but every example using that library is for updating the spreadsheets and I coudn’t find one single example of using it to upload the image to Google Drive folder nor could I find any information if that (still) could be done :-/

This more looks like something went wrong on the TLS socket level. Maybe even as per this.

Do you have a minimal sketch that reproduces the issue?

1 Like

You are right, that was the exact problem and after adding:

client.setInsecure();

everything is working well. I’ve been trying to upload images to Google Drive since March 12th and now it is finally working.

Thank you very much for your help!!

Regards

1 Like