Hide Google Script Web app

Hi! I would like to know if there is a way to “hide” my URL which is a web app from a Google Script. I understand that it’s not an API itself (maybe I’m wrong, I’m newbie). I use the URL in my frontend code to submit the data for a “contact me” form, and with my google script code, it stores the data in a google spreadsheet. In the JS code I just do a fetch using the URL and a POST with the user typed form data.
The URL provided by Google is: https://script.google.com/macros/s/AKfycbxn-JeF5GyfN12bgBJKt0U1C24s2nqULcw_5OIC9Ff7LGrd_1PWnyCjZEREGXj-wqd3/exec

Using KOR, if I click on “Connect API”, I don’t know what to put in “Header Name” and “API Key”, because simply fetch the above URL and everything works.

I hope I was able to explain myself, thanks in advance.

Hello Bruno,

Thank for sharing your message with us. Your connection will work if the request goes to a REST API endpoint. If there’s no need for an API Key, you can put any values as your ‘Header Name’ and ‘API Key’, and the endpoint will just ignore them. In order to hide the values that you have in your URL, you can write the entire text just before ‘/exec’, like this:

Then you will get an endpoint in the form ‘myaccount.korconnect.io/my-google-spreadshit’ which you can use to send your requests as this: ‘rodrigomz.korconnect.io/my-google-spreadshit/exec’.

Hope this helps you with your implementation.

Best regards,