IGNORE. Found the issue. Now I need to figure out how to delete the post.
One of my Photon-based applications - let’s call it app #1 - has been using IFTTT to add rows to a Google sheet (to maintain a log of events) for years; no issues. But recently I decided to bypass IFTTT and its fees and post directly to Google via a Google app script webhook. I have a completey separate application - app #2 - where I have been doing that successfully for months.
To implement the direct-to-Google webhook for app #1 I simply copied the script from the sheet associated with app #2 (which I stole from someone else) and pasted it into the sheet associated with app #1 (script below). But it refuses to work. Invoking the webhook always results in error 401, indicating a rejection by Google due to the post being “unauthorized” even though I have granted all the necessary permissions on the Google side.
I have double-checked and triple-checked the URL and all the other webhook parameters and they are all correct and except for the URL, of course, are identical to te perfectly-functional webhook for my app #2. I completely removed the associated sheet from Google and the webhook from Particle and rebuilt them both from scratch. No change; I still get the 401 error.
I have looked at all the available documentation about Google script authorization and have found nothing that I have missed or not done correctly.
Can anyone here suggest a solution?
