r/GoogleAppsScript • • Aug 27 '25
Question How can I hide my code?
it seems viewers can still see my code, is there no way to actually hide it?
4
Upvotes
r/GoogleAppsScript • • Aug 27 '25
it seems viewers can still see my code, is there no way to actually hide it?
7
u/Suungi Aug 27 '25
You can create separate script file and connect to documents by id, so it allows you to share the doc, but leave script hidden.
3
u/Xurcon2 Aug 27 '25
Dude you need to be a lot more descriptive about what you’re trying to do and what the problem is. Can you give a full run down on the use case here? How are users actually interacting with you? What does the code do?
1
u/FVMF1984 Aug 27 '25
Need more info to answer your question. How did you share the document and how are they able to see the code?
1
u/zandolie Aug 28 '25
If you want to ensure your code is hidden, then you need to create an Add-on. The add-on can be published unlisted if you don't want it to show up in the public store.
If you are using restricted scopes however (gmail is a prime culprit), then there is a big expensive headache that involves security assessments and so on.
While a library might be fine for lay persons, anyone that knows Apps Script can see the code of a library.
1
u/lord_spartan_1990 Aug 29 '25
Encrypt your code using below link I always use it
https://obfuscator.io/
Store your original code separately