electronicsguy / ESP8266

ESP8266 Projects
242 stars 183 forks source link

401 error trying to connect to sheets #36

Closed cgiff closed 7 years ago

cgiff commented 7 years ago

I downloaded and compiled the redirection Library, and a working version of Sujays Spreadsheet, Downloaded and ran an exe version of openssl and obtained security fingerprint from google I'm running on windows7. Created a Google Calander named Test Rest API. When I compile and run the unmodifiable sheet the program works flawlessly . When I create a modifiable copy of the spreadsheet, publish the Googlescript as a Web app, transfer the script key to the source file, compiled and run, I get a 401 error whenever doing a client host.
subsequent debugging of the script I get a TypeError on the doGet function. The other 4 functions work fine and no erros and yest the sheets was cleared ( not before I made a copy of a copy)
I have tried opening my own spreadsheet and using Sujay's script but same issues. So I'm thinking there might be an issue with the script. image

Any input would be appreciated.

cgiff commented 7 years ago

I found the problem while reviewing your excellent Youtube video, I did not have the web app permissions set properly, I selected anyone ( middle option ) instead of (3rd option) anyone including Anonymous. I learned a great deal conquering this one. I consider this piece of codework to be the "Ultimate of IOT data collection". Thank-you, Thank-you. Electronicsguy.

electronicsguy commented 7 years ago

@cgiff cool Carl. Great it sorted out for you! best,